Answer the question
In order to leave comments, you need to log in
How to run code on computer time?
Hello, how can I run the code based on the time on the computer. For example, I run the code at 18:00 and it parses the data, for example, it finishes at 18:03, it needs to be launched at 18:05, roughly speaking every 5 minutes, but 5 minutes from the computer time, and not every 5 minutes after closing the tab during the parser (I work on selenium). 18:00, 18:05, 18:10, etc.?
Answer the question
In order to leave comments, you need to log in
import schedule
def job():
print("Код")
print("<Парсит>")
# каждые 5 минут
schedule.every(5).minutes.do(job)
# каждый день в 18:00
schedule.every().day.at("18:00").do(job)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question