I've spent some significant time searching for something like this, but I think I'm not using the right search terms. Anyway, I have tasks that I want to do at certain times of the day, and these tasks are executable via a python-api.
Is there a module/method I can use to make sure these tasks run at the correct times, and ensures no tasks are skipped? If I wrote something myself it would look really ugly like:
import sys
import time
taskA = False
taskB = False
taskC = False
while True:
now = time.strftime("%H:%M:%S")
if taskA == False and now >= "10:00:00":
<do TaskA>
taskA = True
if taskB == False and now >= "12:00:00":
<do TaskB>
taskB = True
if taskC == False and now >= "16:20:07":
<do TaskC>
taskC = True
sys.exit(0)
time.sleep(1)
This is something that is currently on cron but I want to replace it with a python script.