Developer Data

Cron expression generator and explainer

At 09:00 on Monday to Friday
0 Minute
9 Hour
* Day of month
* Month
1-5 Day of week
Next runs

Reading your clock…

Calculated in your browser · nothing is uploaded

Local · both day fields is an OR, not an AND

A cron expression is five fields (minute, hour, day of month, month, day of week) and this reads one back in plain English with the next six times it fires. Start from a preset such as 0 9 * * 1-5, weekdays at nine, or type your own and watch each field validate against its range.

How to build or read a cron expression

1 Pick a preset to start from, or type an expression straight into the box.
2 Read the field breakdown underneath: each of the five fields is named and explained separately.
3 Check the next runs. They are calculated from your browser’s clock, in your own zone.
4 Copy the expression when it says what you meant.

The single most misunderstood thing about cron is what happens when both day fields are set. 0 0 1 * 1 looks like "the first of the month, if it is a Monday" and actually means "the first of the month, OR any Monday"; cron ORs the two day fields rather than ANDing them, so that expression runs far more often than intended. The explanation flags it explicitly when it sees it.

The other regular confusion is field count. The standard Unix format is five fields; the six-field form with seconds in front is Quartz, used by Java schedulers and Spring. Pasting one into the other is a common and silent failure elsewhere, so a six-field expression is refused here by name rather than misread as a five-field one with a strange minute.

The next-run list is worth reading for a second reason beyond confirming the schedule: it is calculated from your browser’s clock, in your zone, and the zone is printed beside it. A server runs cron in its own zone, which is very often UTC, so a job that looks like nine in the morning here fires at nine there. That difference is the reason a lot of "it ran at the wrong time" tickets exist, and it is not something a schedule string can tell you on its own.

Step syntax is the last thing worth being precise about. */15 means every fifteenth unit counting from zero, so on the minute field it is every quarter hour. 5/10 is not the same and is not a typo: it means from minute five, then every ten. And the day-of-week field takes 0 through 7 with both 0 and 7 meaning Sunday, because implementations disagreed early and cron ended up accepting either.

What people use it for

  • Building a schedule for a new cron job
  • Reading back an expression you inherited
  • Checking when a job will next actually run
  • Confirming a schedule before it goes into a crontab

Questions

Minute, hour, day of month, month, day of week, in that order.

POSIX, crontab
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding