DevToolbox
Validators5 min read

Cron expression examples and syntax guide

Cron expressions schedule recurring jobs across Unix systems, CI pipelines, and cloud platforms, but their five terse fields are easy to misread — and a wrong field can run a job every minute instead of once a day. This guide explains each field and symbol, then gives copy-ready expressions for the schedules people actually need. Check any expression in the Cron Expression Parser before you deploy it.

The five fields

A standard cron expression has five fields separated by spaces. From left to right they are minute, hour, day of month, month, and day of week.

* * * * *
| | | | |
| | | | +-- day of week  (0-6, Sunday = 0)
| | | +---- month        (1-12)
| | +------ day of month (1-31)
| +-------- hour         (0-23)
+---------- minute       (0-59)
The five cron fields

Special symbols

Each field accepts more than a single number. These symbols are what make cron expressive.

SymbolMeaningExample
*Every value* in minute = every minute
*/nEvery n (a step)*/15 = every 15 units
a-bA range1-5 = 1 through 5
a,bA list1,15 = the 1st and 15th
a-b/nA range with a step0-30/10 = 0, 10, 20, 30

Common schedules

Copy-ready expressions for the schedules people ask for most. Paste any of them into the parser to confirm the next run times.

ExpressionRuns
* * * * *Every minute
*/15 * * * *Every 15 minutes
0 * * * *Every hour, on the hour
0 9 * * *Every day at 09:00
0 9 * * 1-5Weekdays at 09:00
0 0 * * 0Every Sunday at midnight
0 0 1 * *Midnight on the 1st of each month
0 0 1 1 *Midnight on 1 January

A common gotcha

When both the day-of-month and day-of-week fields are set to something other than *, most cron implementations run the job when either field matches, not only when both do. That can produce far more runs than intended, so read the parsed description and check the next run times whenever you set both.

Also confirm the time zone: many schedulers run in UTC, so 0 0 * * * fires at midnight UTC, which may be a different local time than you expect.

Frequently asked questions

What do the five cron fields mean?+

In order: minute, hour, day of month, month, and day of week. Each accepts a number, a range, a list, a step, or a star for every value.

How do I run a job every N minutes?+

Use a step in the minute field: */15 * * * * runs every fifteen minutes and */5 every five.

Do cron times use UTC or local time?+

It depends on the system running the job. Many run in UTC, so always confirm the time zone of the scheduler that executes the expression.

Why did my job run more often than expected?+

When both day-of-month and day-of-week are set, most cron systems run when either matches, which can cause extra runs. Check the parsed schedule to be sure.

Try it now

Put this into practice with the free, in-browser tool: