Cron Explainer

Paste a cron expression and get a plain-English explanation

Paste a cron expression

Syntax cheat sheet

*every value
5exactly at value 5
1,15values 1 and 15
9-17range: 9 through 17
*/10every 10th value
8-18/2every 2nd value, 8–18
0 = Sundayday-of-week (7 = Sun too)
min h dom mon dowfield order, left to right

Note: when both day-of-month and day-of-week are restricted, standard cron runs when either matches (OR logic). Paste a 6-field expression (seconds first, Quartz-style) and the seconds field is detected automatically.

How to read a cron expression

Split the expression on spaces and read the fields left to right. Five fields is standard Unix cron and starts at the minute; six fields is Quartz style, where the extra leading field is seconds. Everything else follows the same grammar.

Take */15 9-17 * * 1-5, the default above:

Worked example: */15 9-17 * * 1-5
FieldValueMeaning
Minute*/15Every 15th minute — at :00, :15, :30 and :45
Hour9-17Every hour from 09:00 through 17:00 inclusive
Day of month*Every day
Month*Every month
Day of week1-5Monday through Friday

Together: every 15 minutes between 09:00 and 17:59, Monday to Friday — 36 runs per weekday, 180 per week. Note that 9-17 covers the whole of the 17:00 hour, so the last run is at 17:45 rather than 17:00; hour ranges are one of the easiest things to be off by an hour on.

Two behaviors are worth checking on every expression you inherit. First, if both day of month and day of week are restricted, standard cron runs when either matches — so 0 0 13 * 5 fires on the 13th and on every Friday. Second, cron evaluates in the server's time zone, which is frequently UTC even when your laptop is not; the run times listed above are rendered in your local zone for comparison.

A syntactically valid expression can still encode the wrong schedule, so read the computed dates rather than the syntax. To go the other way and compose a schedule from scratch, use the visual builder.

More tools

Need to compose a schedule from scratch? Use the visual Cron Builder, or browse the cron FAQ for the basics of cron jobs and crontab.