Cron syntax in one minute
A standard cron expression has five fields separated by spaces. A job runs whenever all of them match the current time:
| Field | Allowed values | Notes |
|---|---|---|
| Minute | 0–59 | |
| Hour | 0–23 | 24-hour clock |
| Day of month | 1–31 | |
| Month | 1–12 or JAN–DEC | |
| Day of week | 0–7 or SUN–SAT | 0 and 7 are both Sunday |
Special characters
| * | Every value. * in the hour field means every hour. |
| , | A list of values. 1,15 in day of month means the 1st and the 15th. |
| - | A range. 1-5 in day of week means Monday to Friday. |
| / | A step. */10 in minutes means every 10 minutes; 9-17/2 in hours means 9, 11, 13, 15 and 17. |
| @daily | Shortcuts: @yearly, @monthly, @weekly, @daily, @hourly and @reboot (once at startup). |
Good to know
If both day of month and day of week are restricted, most cron implementations run the job when either matches. 0 0 1 * 1 runs on the 1st of the month and on every Monday. Cron uses the server's local timezone unless your system says otherwise, so check the UTC view above if your server runs in UTC.