Read a cron expression across a daylight saving change
Admin ·
An expression describes matching wall-clock minutes. To find the corresponding instant, the preview also needs a time zone and a starting point.
Cron Expression Translator and Validator
Find a Sunday that has two 01:30s
Enter 30 1 * * SUN, set the start to 3 November 2024 at 04:00 UTC and choose America/New_York. The first two results are both 01:30 on Sunday. Their offsets are GMT−4 and GMT−5, corresponding to 05:30 and 06:30 UTC.
Check a spring gap
Change the expression to 30 2 * * * and start on 10 March 2024 at 00:00 UTC in the same zone. There was no 02:30 in New York that day. The next matching wall time is 02:30 on 11 March. Individual cron daemons can have additional handling for clock changes.
Check what happens at a calendar boundary
For a monthly task, compare 0 9 31 * * with 0 9 1 * *. The first schedule has no occurrence in a month with only 30 days. The second is appropriate if the job should start each new calendar month. Choose UTC to isolate the calendar question from local clock changes.
Start the preview just before the next month and inspect multiple occurrences. A single plausible timestamp cannot establish that a schedule continues at the desired interval.
Common questions
Does validating an expression guarantee a matching date?
No. A day of 31 and a month of February are individually valid. The preview reports when it finds no matching minute in its eight-year search window.
Is the start time included?
The preview lists matching instants strictly after the UTC start. To include a particular minute, choose an earlier start.
Sources
Put it into practice.
- Cron Expression Translator and Validator
- Crontab Expression Builder
- Cron to systemd Timer Converter
- Unix timestamp converter