YorozuyaIT
Dev & Infrastructure

My Scheduled Job Ran Twice (or Not at All) When the Clocks Changed: Fixing Daylight Saving Bugs

Written by the Yorozuya IT editorial team, based in Japan. Menus, apps, and rules change, so check the date.

Short answer

If your logs show a job that ran twice on the night the clocks went back, or a nightly report that never ran when they moved forward, nothing is wrong with the scheduler. The local time you picked either happened twice or did not exist.

The two bad hours

Timeline of the fall-back day in New York with two 01:30 moments, the spring-forward gap, and four fixes

Fall back. On Sunday, November 1, 2026 in New York, clocks went from 01:59 daylight time back to 01:00 standard time. The wall-clock time 01:30 occurred twice: once at 05:30 UTC and again at 06:30 UTC. The day was 25 hours long. In Berlin it was the same story on October 25, with 02:30 occurring twice.

Spring forward. On Sunday, March 14, 2027, clocks in New York jump from 01:59 to 03:00. The wall-clock time 02:30 does not exist, and the day is 23 hours long. EU countries change on March 28, 2027.

You can see it in Python with zoneinfo:

from datetime import datetime, timezone
from zoneinfo import ZoneInfo

ny = ZoneInfo("America/New_York")

# The same wall-clock time, twice
for fold in (0, 1):
    t = datetime(2026, 11, 1, 1, 30, tzinfo=ny, fold=fold)
    print(fold, t.isoformat(), "->", t.astimezone(timezone.utc).isoformat())
# 0 2026-11-01T01:30:00-04:00 -> 2026-11-01T05:30:00+00:00
# 1 2026-11-01T01:30:00-05:00 -> 2026-11-01T06:30:00+00:00

# A time that does not exist
t = datetime(2027, 3, 14, 2, 30, tzinfo=ny)
print(t.astimezone(timezone.utc).astimezone(ny).isoformat())
# 2027-03-14T03:30:00-04:00   (it was silently moved)

The fold attribute says which of the two repeated moments you mean. Without it, you get the first by default, which is how the second occurrence goes missing or doubles up in a naive program.

Typical failure patterns

Make schedules safe

  1. Run servers and schedulers in UTC. UTC has no clock changes. Convert to local time only when showing times to a person.
  2. Store timestamps in UTC, with the time zone name kept separately if you need to recreate local time.
  3. If you must use local time, avoid 01:00 to 03:00. Pick a time that never repeats or disappears in the zones you serve, such as 04:00.
  4. Make jobs idempotent. A second run should do no harm: use a lock, a run ID, or a "last processed" marker.
  5. Know what you mean by "a day". For calendar logic, use a time zone-aware library and add calendar days, not 24-hour intervals.
  6. Monitor. Add a dead-man's check that alerts when an expected run is missing, and a duplicate-run check for money-moving jobs.
  7. Test the edges. Run your schedule logic against the transition dates in a test, in the time zones your users are in.

Quick diagnosis

The next clock changes are scheduled for March 14, 2027 in the US and March 28, 2027 in the EU, if the rules stay as they are. That is plenty of time to fix the schedules.

Dates as scheduled under current rules, as of November 5, 2026.

FAQ

When did the clocks change in 2026?

In most of Europe they went back on Sunday, October 25, 2026. In the United States they went back on Sunday, November 1, 2026. The next changes are scheduled for March 14, 2027 (US) and March 28, 2027 (EU), unless the rules change.

Does cron handle this correctly?

Behavior varies between cron implementations and versions, and between fixed-time and repeating jobs. Do not rely on it. Test on your system, or schedule in UTC where the problem does not exist.

Is a 24-hour interval the same as one day?

Not across a clock change. Adding 24 hours of elapsed time and adding one calendar day can land on different local times. Decide which you mean.

Keep reading