#609·schedule

Inconsistent startup behaviour on daily tasks at midnight - Timezone related

Author: wasnertobiasCreated Dec 8, 2023Updated Jul 16, 2024

timezone_string = 'Europe/Berlin'

This does not get run on a startup schedule.every().day.at("13:05", timezone_string).do(day_rollover)

Whereas this runs on startup instantly schedule.every().day.at("00:00", timezone_string).do(day_rollover)

2023-12-08 15:16:12,838 - INFO - Scheduler started 2023-12-08 15:16:12,839 - DEBUG - Running job Job(interval=1, unit=days, do=day_rollover, args=(), kwargs={})

However, this behavior is different on different machines. I am not able to reproduce this on my Windows machine (running exactly the same version of schedule 1.2.1) in a virtual env, but I was able to reproduce this on a Linux Server, where the python application is running in a docker container (I can provide you with the Dockerfile if needed).