Answer the question
In order to leave comments, you need to log in
Is it possible to control the timing?
Is it possible to somehow assign an event to occur, for example, 12:30, or will you have to check every second if the right time has not come?
Answer the question
In order to leave comments, you need to log in
Is it possible to somehow assign an event to occur for example 12:30
crontab
with the full path to your script:30 12 * * * /usr/bin/python /home/RandomProgrammer/scripts/event.py
#!/usr/bin/python
chmod a+x event.py
The correct solution would be to use the OS scheduler (cron on Linux, task scheduling on Windows).
But if you really need a solution in pure Python, the schedule package will help. Only it requires an eternal loop to work, so your script will hang in memory and eat a little bit of percent. That's why I advise you to get by with OS tools.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question