cron icon indicating copy to clipboard operation
cron copied to clipboard

Don't skip crons when time jumps forward due to DST

Open rdingwall opened this issue 11 months ago • 0 comments

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.

rdingwall avatar Mar 12 '25 02:03 rdingwall