Reference

Cron cheat sheet

Everything you need to write a cron expression correctly — the five fields, the special characters, the @daily shortcuts, and 28 ready-to-copy schedules in plain English.

The five fields

A cron expression is five values separated by spaces. Each one answers a different question, and a job runs only when all of them match the current time.

┌───────────── minute (0–59) │ ┌─────────── hour (0–23) │ │ ┌───────── day of month (1–31) │ │ │ ┌─────── month (1–12) │ │ │ │ ┌───── day of week (0–6, Sunday = 0) │ │ │ │ │ * * * * *
FieldAllowed valuesMeaning
Minute0–59Which minute of the hour
Hour0–23Which hour (24-hour clock, 0 = midnight)
Day of month1–31Which day of the month
Month1–12Which month (1 = January)
Day of week0–6Which weekday (0 = Sunday, 6 = Saturday)

Special characters

CharacterWhat it doesExample
*Every value* * * * * — every minute
,List of values0 9,17 * * * — at 9:00 and 17:00
-Range of values0 9 * * 1-5 — Monday through Friday
/Step values*/15 * * * * — every 15 minutes
CombinedMix them freely0 8-18/2 * * 1-5 — every 2 hours, 8am–6pm, weekdays

28 common cron expressions

Copy any of these straight into your crontab — or into cronjobs.live if you'd rather not run a server.

ExpressionRuns
* * * * *Every minute
*/2 * * * *Every 2 minutes
*/5 * * * *Every 5 minutes
*/10 * * * *Every 10 minutes
*/15 * * * *Every 15 minutes
*/30 * * * *Every 30 minutes
0 * * * *Every hour, on the hour
30 * * * *Every hour at :30
0 */2 * * *Every 2 hours
0 */6 * * *Every 6 hours (00:00, 06:00, 12:00, 18:00)
0 0 * * *Every day at midnight
0 9 * * *Every day at 9:00 AM
30 23 * * *Every day at 11:30 PM
0 9,17 * * *Twice a day — 9:00 AM and 5:00 PM
0 9 * * 1-5Weekdays at 9:00 AM
0 9 * * 6,0Weekends at 9:00 AM
0 0 * * 0Every Sunday at midnight
0 0 * * 1Every Monday at midnight
0 8 * * 1Every Monday at 8:00 AM (weekly report)
0 0 1 * *First day of every month at midnight
0 0 28-31 * *Late each month (guard for last day in your script)
0 3 1 * *Monthly on the 1st at 3:00 AM
0 0 1 1 *Once a year — 1 January at midnight
0 0 1 */3 *Quarterly — 1st of every 3rd month
15 2 * * *Nightly at 2:15 AM (typical backup window)
*/5 9-17 * * 1-5Every 5 minutes, 9am–5pm, weekdays only
0 */4 * * 1-5Every 4 hours on weekdays
0 12 1-7 * 1First Monday of the month at noon

Shortcut strings

Most cron implementations also accept these readable aliases:

ShortcutEquivalentRuns
@yearly0 0 1 1 *Once a year at midnight, 1 January
@monthly0 0 1 * *Once a month at midnight on the 1st
@weekly0 0 * * 0Once a week at midnight on Sunday
@daily0 0 * * *Once a day at midnight
@hourly0 * * * *Once an hour, on the hour

Day of month vs day of week

This trips almost everyone up. When you restrict both the day-of-month and the day-of-week fields, cron runs the job when either matches — not both. So 0 0 1 * 1 fires on the 1st of the month and on every Monday.

If you need "the first Monday of the month", restrict the day-of-month to a range and the weekday to the day you want: 0 12 1-7 * 1 — the only Monday that falls between the 1st and 7th is the first one.

Common mistakes

Skip the server entirely.
cronjobs.live runs any of these schedules for you, calls your URL or webhook, keeps a log of every run and emails you the moment one fails — free, no credit card.
Create a free account

Related: What is a cron job? · How to monitor cron jobs