Skip to content
Technology·1 min read·

Cron expression explainer

Explain a five-field cron expression in plain language: minute, hour, day, month, and weekday.

The answer

Five fields, in order, are minute, hour, calendar day, month, and weekday. Stars mean every value. A slash is a step. If the calendar day and the weekday are both restricted, cron runs when either one matches.

Minute, hour, day of month, month, day of week.

Result

Meaning

At 09:00 on every day of the month, every month, Monday through Friday.

Fields

0  minute
9  hour
*  day of month
*  month
1-5  day of week

What do you want to do next?

How this works

Ranges, lists, steps, and the English month and weekday names are read field by field. Sunday is 0 or 7. Names such as MON and JAN are accepted in any case.

The sentence is an explanation, not a scheduler. This page does not know a particular app’s extra syntax, such as a seconds field or a nickname like @daily. Those expressions are rejected or would be the wrong five fields.

Practical steps

  1. 1

    Paste five fields separated by spaces.

  2. 2

    Read the sentence, then the field list under it.

  3. 3

    If both a calendar day and a weekday are set, remember that classic cron uses either, not both.

Examples

  • 0 9 * * 1-5

    At 09:00 on every day of the month, every month, Monday through Friday.

Common mistakes

  • ×

    Assuming the calendar day and the weekday must both match. In classic cron, either match is enough.

Frequently asked questions

Does this accept a seconds field?

No. Quartz-style six-field expressions are not the five-field form explained here.

What does */15 in the minute field mean?

Every 15 minutes, starting at minute 0.

Sources