Cron schedules to copy: every 5 minutes, hourly, daily, weekdays, monthly, quarterly
The schedules people write most, grouped by how often they run. Tap one to read it in plain English and see its next runs in your time zone, then copy it.
How to use it
Tap a schedule under the box, from every minute to once a year. Read what it means and check the next runs in your server’s time zone. Copy the expression, or change a field and watch the sentence follow.
Examples
Every 90 minutes takes two lines
0 */3 * * * 30 1-23/3 * * *
00:00, 01:30, 03:00, 04:30, … 22:30
A step can’t cross the hour, so the :00 runs and the :30 runs each get a line.
Every 7 minutes is not quite
*/7 * * * *
:00, :07, … :49, :56, then :00 again
Steps restart each hour: the gap from :56 to :00 is 4 minutes.
Every schedule on this page
| Schedule | Cron expression |
|---|---|
Every minute | * * * * * |
Every 5 minutes | */5 * * * * |
Every 15 minutes | */15 * * * * |
Every 30 minutes | */30 * * * * |
Every hour | 0 * * * * |
Every 2 hours | 0 */2 * * * |
Every 6 hours | 0 */6 * * * |
Hourly, 9 to 5 on weekdays | 0 9-17 * * 1-5 |
Daily at midnight | 0 0 * * * |
Daily at 9:00 | 0 9 * * * |
Daily at 2:30 | 30 2 * * * |
Twice a day, 8:00 and 20:00 | 0 8,20 * * * |
Weekdays at 9:00 | 0 9 * * 1-5 |
Weekends at 10:00 | 0 10 * * 0,6 |
Mondays at 9:00 | 0 9 * * 1 |
Sundays at midnight | 0 0 * * 0 |
1st of the month | 0 0 1 * * |
15th at noon | 0 12 15 * * |
Quarterly | 0 0 1 1,4,7,10 * |
Every 6 months | 0 0 1 1,7 * |
Yearly, 1 January | 0 0 1 1 * |
Schedules five fields can’t write
0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job
Before you copy one
Questions
- How do I run a cron job every 5 minutes?
*/5 * * * * runs at :00, :05, :10 and so on, every hour of every day. 5 divides 60, so the gap is always 5 minutes. - What is the difference between @daily and 0 0 * * *?
None in Vixie cron and cronie: @daily (or @midnight) is 0 0 * * *, @hourly is 0 * * * *, @weekly 0 0 * * 0, @monthly 0 0 1 * *, @yearly 0 0 1 1 *. @reboot runs once at start-up and has no five-field form. - How do I run a job on weekdays only?
Put 1-5 in the last field: 0 9 * * 1-5 is 9:00 Monday to Friday. 0,6 (or 6,0) is Saturday and Sunday. - Why did my job not run at the time I wrote?
Most often the zone: the server runs cron in its own zone, often UTC. Then the day fields: with both a day of month and a day of week set, cron runs when either matches. Paste the expression in the box to see its next runs in the zone you pick.