Inconsistent startup behaviour on daily tasks at midnight - Timezone related
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 999
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the two daily schedules from the issue with schedule 1.2.1 on the reported Linux Docker environment and compare them with the Windows virtual-environment behavior. Trace the startup execution and timezone handling, then establish the expected midnight behavior and add coverage or documentation that makes the result consistent and verifiable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100