An almanac for cron

Tide Table

Twelve months of a cron schedule’s firings, read on any clock, with the seams where daylight saving makes it skip or run twice.

Five fields: minute, hour, day of month, month, day of week. Shortcuts such as @daily work too.

In plain English

 

Time zones up to three
Cron reads the clock of

Loading the almanac engine

Go compiled to WebAssembly, with the tz database inside.

How the seams are read

Whose rules

Every firing here comes from robfig/cron v3, the Go cron library Kubernetes uses to parse CronJob schedules. The engine calls the library’s own parser, then its Next function, each time from the previous firing, as a running scheduler does. Other cron programs treat clock changes differently, so read this as robfig/cron’s behaviour, not cron’s.

When clocks go forward

The wall-clock times in the gap never happen. robfig/cron skips any firing that falls in them; its documentation says jobs scheduled in a leap-ahead transition “will not be run”. A red seam with a hollow ring marks each one.

When clocks go back

The repeated stretch happens twice, and robfig/cron fires in both, so a 01:30 job runs twice, an hour apart. A red seam with a double tick marks it. On a zone that only reads the schedule, a red seam also marks the day its readings shift.

The library’s quirks

robfig/cron searches for the next run an hour at a time. After a change that isn’t a whole hour (Lord Howe Island moves 30 minutes) or isn’t on the hour (the Chatham Islands change at 02:45), its steps land off the hour. On those days it can pass over a time that does happen, or add an extra run, marked with a red dot, at a time the expression doesn’t name. In the Chatham Islands its Next can even return the same run again, so a scheduler would re-fire in a tight loop for a few minutes; the page draws that run once and says so. Each seam says which of these happened.

What is exact

Counts, the dial, the lists and the seams are exact for the walk shown, which starts at the first instant of the almanac’s first day. To stay quick, the engine gives Next a fixed-offset zone wherever the zone’s offset can’t change during the call; a test compares that with the real zone in every zone of the tz database. On the year strip, ticks are grouped into 15-minute bins so a busy day still fits one line. Zone rules come from the tz database built into the engine, not from your browser.