D
D
Dmitry Shevchenko2020-10-23 18:56:53
Python
Dmitry Shevchenko, 2020-10-23 18:56:53

Execute a function after a certain amount of time?

I use the telebot library and the code in it works strangely: everything without message .handler is simply not executed, but you need to make sure that the function is called once every 30 seconds and returns to where the program stopped (interruption). Tell me the library or something else

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniel SERG, 2020-10-24
@genteeklaik

try it)
import time
time.sleep(30) # Sleep in 30 seconds

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question