cron
cron copied to clipboard
Don't skip crons when time jumps forward due to DST
We're investigating a production bug at Monzo where a 2:00 AM US/Pacific cron was skipped on 2025-03-09. We discovered the root cause is the https://github.com/robfig/cron library skips jobs that are scheduled during the interval when time jumps forward due to DST changes.
It seems the library's behavior is a bit non-standard in this regard, and differs from ISC cron which is used in most distributions of Linux and BSDs:
https://man7.org/linux/man-pages/man8/cron.8.html
If time was adjusted one hour forward, those jobs that would have run in the interval that has been skipped will be run immediately.
This PR aligns the behavior of the library with ISC cron.