opyebCronPulse

Daylight saving and cron: the day 02:30 disappears

Time zones & DST · 7 min read

One-line answer: How clock changes affect cron runs, and how to move jobs out of the 2–3 AM danger window.

Cron usually follows the wall clock. On the day daylight saving starts, 02:00 jumps to 03:00; on the day it ends, 02:00 appears a second time. A job pinned to 02:30 either does not run that day or runs twice.

# New York
30 2 * * *   # spring forward: 02:30 does not exist
30 4 * * *   # outside the 01:00-03:00 window
0 9 * * *    # pinned to UTC: no DST effect

What happens

TransitionExample (New York)A 02:30 job
Spring forwardSecond Sunday in March, 02:00 → 03:0002:30 does not exist: skipped
Fall backFirst Sunday in November, 02:00 → 01:0002:30 occurs twice: may run twice

Implementations differ. Some silently skip a nonexistent time; some shift the run to the next valid instant. For the repeated hour, some run once, some twice, some only on the first occurrence. Assuming your scheduler “handles it” is how incidents start.

Ways to avoid it

  • Pin to UTC. A schedule defined in UTC never meets a daylight saving transition. Logs and monitoring become easier to compare too.
  • Avoid the transition window. If local time matters, move jobs from 02:00–03:00 to after 04:00. Most transitions happen between 01:00 and 03:00 local time.
  • Make jobs idempotent. Design so that running twice produces the same result. Duplicates also come from retries and manual reruns, not only DST.
  • Use a calendar rule. For “exactly once per day”, a scheduler that computes the first valid instant of the day, or an RRULE-based calendar, is often more predictable than cron.

The order to check

For a live system: confirm the scheduler's time zone; list the next twelve months of transitions and mark jobs between 02:00 and 03:00; then confirm each of those jobs is safe to run twice. CronPulse's DST warning computes the actual dates in the next fifteen months when the chosen schedule is skipped or repeated in the selected zone.

One-line summary

Daylight saving breaks exactly two nights a year, and only for jobs in the small hours. Avoid those two windows and most of the risk disappears.

Paste an expression and see its next run times right away.

Open CronPulse

Frequently asked questions

Does Korea or Japan observe daylight saving?

Neither Korea nor Japan currently observes daylight saving, so schedules in Asia/Seoul or Asia/Tokyo are unaffected. If the server runs in UTC or another region, that region's transitions still apply to the job.

How do I notice a job ran twice on a DST day?

Log an execution ID and timestamp at the start of every run and alert when the same logical day appears twice. CronPulse's DST warning tells you the dates in advance so you can test them.

Sources

Related reading