A cron expression schedules a job to run automatically. It has five fields, separated by spaces, that set the minute, hour, day of the month, month, and day of the week. This cheat sheet explains each field, the special characters, and gives ready-to-use examples.
Field order:
minute hour day-of-month month day-of-week. For example 30 9 * * 1-5 means 09:30 on weekdays.The five fields
| Field | Allowed values | Notes |
|---|---|---|
minute |
0-59 |
Minute of the hour |
hour |
0-23 |
Hour, 24-hour clock |
day of month |
1-31 |
Day of the month |
month |
1-12 |
Or JAN-DEC |
day of week |
0-6 |
0 is Sunday; or SUN-SAT |
Special characters
| Character | Meaning | Example |
|---|---|---|
* |
Every value | * * * * * every minute |
, |
A list of values | 0 9,17 * * * at 09:00 and 17:00 |
- |
A range | 0 9-17 * * * every hour 09:00 to 17:00 |
/ |
A step | */15 * * * * every 15 minutes |
Common examples
| Expression | When it runs |
|---|---|
* * * * * |
Every minute |
*/5 * * * * |
Every 5 minutes |
0 * * * * |
Every hour, on the hour |
0 0 * * * |
Every day at midnight |
30 9 * * 1-5 |
09:30 on weekdays (Mon to Fri) |
0 9 * * 1 |
Every Monday at 09:00 |
0 0 1 * * |
Midnight on the first of each month |
0 0 * * 0 |
Every Sunday at midnight |
0 */6 * * * |
Every 6 hours |
0 22 * * 1-5 |
22:00 on weekdays |
Shortcut strings
| String | Equivalent to |
|---|---|
@yearly |
0 0 1 1 * |
@monthly |
0 0 1 * * |
@weekly |
0 0 * * 0 |
@daily |
0 0 * * * |
@hourly |
0 * * * * |
@reboot |
Once at startup |
Frequently Asked Questions
What do the five cron fields mean?
In order they are minute, hour, day of the month, month, and day of the week, each separated by a space.
What does an asterisk mean in cron?
An asterisk means every value for that field, so it places no restriction on when the job runs.
How do I run a job every 15 minutes?
Use a step in the minute field, written as */15, with asterisks for the other fields.
Does 0 mean Sunday or Monday for day of week?
In standard cron, 0 is Sunday. Some systems also accept 7 for Sunday.
Build and check schedules with our free Crontab Generator and Cron Parser.