2026-10-21 · 6 min read · Rahul Chitturi
- cron
- scheduling
- debugging
The cron page trims the expression, parses it with cron-parser in the timezone you typed, and prints five future runs. Each run is Date.toISOString(), so every line ends in Z. The timezone changes which instant is chosen. It does not change the zone printed on the line.
Five fields are minute, hour, day of month, month, and day of week. Six fields add seconds in front. A seventh field is not a year.
Count the fields before you read midnight
With the clock at 2026-10-21T03:30:00.000Z, */15 * * * * previews 03:45, 04:00, 04:15, 04:30, and 04:45 UTC. The six-field expression 0 0 * * * * previews 04:00, 05:00, 06:00, and so on: second 0, minute 0, every hour. It is not a daily job. 0 0 0 * * * is the daily midnight form, and from that same clock the next line is 2026-10-22T00:00:00.000Z.
*/30 * * * * * includes 2026-10-21T03:30:30.000Z. A year stuck on the end, as in 0 0 1 1 * 2027, throws Constraint error, got value 2027 expected range 0-7. The 2027 was read as a day of week.
- Treat the first of six fields as seconds.
- Use 0 0 0 * * * for midnight.
- Stop at six fields.
- Read the Z as UTC even when the timezone box is not UTC.
Convert the Z line back to the daemon zone
0 0 * * * in Asia/Kolkata, from that same 03:30Z clock, previews 2026-10-21T18:30:00.000Z. That is midnight in India on the 22nd. The same expression in America/New_York previews 2026-10-21T04:00:00.000Z, which is midnight Eastern Daylight Time. utc in lowercase matches UTC. A leading space, an empty box, and Not/AZone all fail. The message starts with CronDate: unhandled timestamp: and then includes the current time.
A blank expression does not error. The next-run list is empty because trim removed it before parse.
Expand nicknames yourself when the case is wrong
@daily, @hourly, and @yearly parse. From 03:30Z on 21 October 2026, @daily starts at 2026-10-22T00:00:00.000Z. @Daily and @reboot both throw Constraint error, got value 0 expected range 1-12. The page has no special case for those spellings.
Use the cron tool for the five lines, the timestamp converter to place a Z instant in the host zone, and diff to compare a five-field line with the six-field line that only looks identical. Quote the field count and the timezone box in the ticket.