2026-10-21 · 8 min read
- cron
- scheduling
- tooling
The cron page shows the next five runs for one expression in one timezone. The parser is cron-parser. Each line is an ISO-8601 instant in UTC, because the page calls toISOString(). The timezone box selects the calendar. The printed zone is always Z.
Examples below use a frozen clock of 2026-10-21T03:30:00.000Z so the lines can be checked again. The live page uses the current time, so the first line moves. The field rules do not.
Put seconds only in a six-field expression
Five fields start at minutes. */15 * * * * from that clock is 03:45Z, then every fifteen minutes. Six fields start at seconds. 0 0 * * * * is every hour at minute 0, and the first line is 04:00Z. 0 0 0 * * * is daily at midnight, and the first line is 2026-10-22T00:00:00.000Z. */30 * * * * * fires on the half-second, including 03:30:30Z.
A seventh field is not a year. 0 0 1 1 * 2027 throws Constraint error, got value 2027 expected range 0-7. The extra number was read as a weekday. */0 * * * * throws Constraint error, cannot repeat at every 0 time. 59 23 31 2 * throws Invalid explicit day of month definition, because February has no day 31.
- Count fields before naming the schedule.
- Write midnight as 0 0 0 * * * when you need seconds.
- Leave the year out.
- Copy all five lines, not only the first.
Translate Z into the timezone box
0 0 * * * in Asia/Kolkata previews 2026-10-21T18:30:00.000Z, which is 00:00 on 22 October in India. The same fields in America/New_York preview 2026-10-21T04:00:00.000Z, midnight during Eastern Daylight Time. utc in lowercase matches the UTC box. Asia/Calcutta matches Asia/Kolkata for this expression.
Not/AZone, an empty timezone, and a timezone with a leading space fail. The message starts with CronDate: unhandled timestamp: and then includes the current time. A blank expression is quieter: trim removes it, and the list is empty with no error.
Combine day fields the way this parser does
When both the day of month and the day of week are restricted, a run that matches either field is included. 0 12 13 * FRI from that October clock includes Fridays at 12:00Z and the 13th at 12:00Z. 2026-12-13T12:00:00.000Z is in the list, and 13 December 2026 is a Sunday. A star in either field means that field is not a restriction.
The question mark is another star here. 0 0 ? * * previews the same midnights as 0 0 * * *. Sunday is both 0 and 7: 0 0 * * 0 and 0 0 * * 7 next meet on 2026-10-25. L is the last day of the month. 5L is the last Friday. 5#1 is the first Friday. 1W throws Invalid characters, got value: 1W.
Use the nickname only in lowercase
@daily, @hourly, and @yearly expand. From the frozen clock, @daily starts at 2026-10-22T00:00:00.000Z and @yearly starts at 2027-01-01T00:00:00.000Z. @Daily and @reboot throw Constraint error, got value 0 expected range 1-12. Expand those by hand into fields this parser accepts, and write the sentence next to the fields.
Use the cron tool for the preview, the timestamp converter to read a Z line in the host zone, diff to compare a five-field expression with a six-field one, and the JSON formatter if you store the five lines in a ticket. The daemon's own timezone still has to match the box.