Guide · Updated 2026-10-08
Cron Expressions Explained with Tested Examples
How the five fields of a cron expression work, with worked examples such as every Monday at 9am and every 15 minutes during office hours.
Cron is the schedule language used by servers to run jobs on a timetable. A cron expression packs the whole schedule into five fields. It is compact and easy to misread, so it helps to check an expression before you rely on it. Paste any of the examples below into the Cron Expression Generator to read it in plain English and see the next run times.
The five fields
| Position | Field | Allowed values |
|---|---|---|
| 1 | Minute | 0 to 59 |
| 2 | Hour | 0 to 23 |
| 3 | Day of the month | 1 to 31 |
| 4 | Month | 1 to 12 |
| 5 | Day of the week | 0 to 6, where 0 is Sunday (and sometimes 7) |
An asterisk * means every value. A comma lists values (1,15), a hyphen gives a range (9-17) and a slash gives a step (*/15 is every 15).
Tested examples
| Expression | Meaning (as the tool reads it) |
|---|---|
| 0 9 * * 1 | At minute 0 of hour 9 on Monday, so 09:00 every Monday |
| */15 9-17 * * 1-5 | Every 15 minutes, during hours 9 to 17, Monday to Friday |
| 30 2 1 * * | At 02:30 on the first day of every month |
| 0 0 * * 0 | At midnight on Sunday, the start of each Sunday |
Things that catch people out
- Time zone. A cron job runs in the time zone of the server, which is often UTC. The generator shows the next runs in your own local time, so compare the two before you assume.
- Day of month and day of week together. In many cron systems, setting both means “either”, not “both”. Check your system’s rule.
- Invalid values. The generator does not reject an impossible value such as minute 61. It describes it and then reports that there is no run in the next year, so always check that the next-runs list is not empty.
- Step values. */15 in the minute field means 0, 15, 30 and 45, which is not the same as “15 minutes after the last run”.
- Different formats. Some systems add a seconds field or accept names such as @daily. This tool covers the standard five-field format only.
Checking the result
Look at the first few run times. If you wanted 09:00 on Mondays and the list shows other times or days, adjust the expression. For timestamps in logs, the Unix Timestamp Converter turns them into readable dates.
Frequently asked questions
How do I run something every five minutes? Use */5 in the minute field and asterisks in the rest: */5 * * * *.
How do I run a job on the last day of the month? Standard cron cannot express that directly. Run daily and check the date in the script.