F
F
FinnJI2018-10-10 13:14:42
MySQL
FinnJI, 2018-10-10 13:14:42

How to make a countdown using Python + MySQL?

I am writing a bot for VK, which I will then bring to the host. I need to make sure that every 5 minutes the value in the database increases by a certain number, and stops when certain limits are reached. Perhaps it will be easier to understand this by analogy with the regeneration of health in games: you do not have full hp - it regenerates, you get hit - the regen starts again. And I don't understand how it can be done. I would be grateful for any idea.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2018-10-10
@FinnJI

You can also use the built-in MySQL task scheduler , then you don’t have to pull anything from cron. By default, this scheduler is disabled, so you must first enable it in the configs.

L
longclaps, 2018-10-10
@longclaps

Google Countdown algorithm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question