Cron Expressions Explained

A cron expression is five fields that describe a repeating schedule. Once you can read the fields, most schedules are obvious at a glance.

Developer · 6 min read · By Chris Lenga · Updated

The five fields

In order: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–7, where 0 and 7 are both Sunday). So 0 9 * * 1 means 09:00 every Monday. The Cron Expression Builder explains any expression in plain English and previews the next runs.

Special characters

* means every value, a-b is a range, a,b,c is a list, and */n is a step (every n units). For example */15 * * * * runs every 15 minutes.

The day-of-month / day-of-week rule

When both the day-of-month and day-of-week fields are restricted, standard cron fires when either one matches, not both. 0 0 1 * 1 runs on the 1st of the month or on any Monday. This trips up a lot of people, so double-check schedules that set both.

Not every scheduler is standard cron

A plain crontab runs in the server’s own timezone. Quartz, and tools built on it, add a seconds field at the front and use ? for “no specific value”. AWS EventBridge takes six fields, with a year at the end, and needs ? in either the day-of-month or the day-of-week field. GitHub Actions uses the standard five fields but always runs in UTC, and no more often than every five minutes.

Try the tools

All guides →