Answer the question
In order to leave comments, you need to log in
How to schedule an action in python?
I have a telegram bot. Where should auto income from internal businesses go in the bot. How can I add a certain amount to a variable every hour?
Answer the question
In order to leave comments, you need to log in
Question from the title: shedule library
Question from the text of the question: Threading+sleep library
In fact, improve the formula that calculates based on the current date, the date when the formula was last calculated and the value of this formula in the last calculation. Store the date and past value and update when the user asks. This approach will save you a lot of computing resources.
Head-on solution:
import time
while True:
time.sleep(59)
if time.localtime().tm_min == 59:
#тут действие
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question