I
I
InternetMaster2021-12-19 15:51:56
Python
InternetMaster, 2021-12-19 15:51:56

How to make the program itself signal the time?

There is a database where several thousand lines with time (in unix format). It is necessary that when the time comes, the code itself performs the necessary process. time.sleep()will not work, because the code can be restarted and the process will crash. There are options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d3m0l, 2021-12-19
@d3m0l

Try schedule
Example code:

def job():
    print("Работаю")

schedule.every().hour.do(job) #каждый час будет запущена функция job

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question