Ben Chuanlong Du's Blog

It is never too late to learn.

Schdule Jobs in Python

Tips and Traps

  1. If you schedule a job $J_1$ using schedule in IPython shell, and then interrupt the following loop that checks and runs pending jobs,
    while True:
         schedule.run_pending()
    
    the scheduled job $J_1$ is still there unless you stop the current IPython shell. The effective consequence of this is that if you schedule another job $J_2$, and start to run it using the following loop,