Cron Schedule Reference

Understand how to schedule jobs on Unix-like systems. The syntax determines when the cron daemon will execute the command.

The Syntax

Five fields separated by space:

* * * * *
│ │ │ │ │
│ │ │ │ └─── Day of Week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
│ │ │ └───── Month (1 - 12)
│ │ └─────── Day of Month (1 - 31)
│ └───────── Hour (0 - 23)
└─────────── Minute (0 - 59)

Common Examples

Key / CodeDescription
* * * * *Every minute
0 * * * *Every hour (at minute 0)
0 0 * * *Every day at midnight
0 9 * * 1Every Monday at 9:00 AM
*/15 * * * *Every 15 minutes
0 0 1,15 * *At midnight on the 1st and 15th of every month

Special Strings

Key / CodeDescription
@rebootRun once, at startup
@dailyRun once a day (0 0 * * *)
@learningRun once a week (0 0 * * 0)
@monthlyRun once a month (0 0 1 * *)
Knowledge is power.