DevOps

Cron Expression Cheat Sheet — Every Schedule You'll Ever Need

📅 June 16, 2026⏱ 7 min read 🛠️ Try the Cron Tester →

Nobody memorizes cron syntax. You look it up, copy the expression, paste it, and move on. This page is the reference you'll keep coming back to — every common schedule, the field-by-field syntax, and the mistakes that silently break production jobs.

The 5 Cron Fields

A standard cron expression has five space-separated fields. Left to right, smallest unit to largest:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12 or JAN-DEC)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *

The expression fires when all five fields match the current time. An asterisk (*) means "every value." A mnemonic: "Minute, Hour, Day, Month, Weekday" — left to right, small to big.

Operators

OperatorMeaningExample
*Every value* * * * * — every minute
,List of values0,15,30,45 — at minutes 0, 15, 30, 45
-Range9-17 — hours 9 through 17
/Step (every Nth)*/5 — every 5th value

Important: */5 in the minute field means "at minute 0, 5, 10, 15, 20..." — it is anchored to zero, not to the time you saved the job. If you save at 12:03, the next run is 12:05, not 12:08.

Every-Minute and Every-N-Minutes

ScheduleExpression
Every minute* * * * *
Every 5 minutes*/5 * * * *
Every 10 minutes*/10 * * * *
Every 15 minutes*/15 * * * *
Every 30 minutes*/30 * * * *

* * * * * means every single minute — 1,440 times per day. Make sure your job can complete in under 60 seconds, or you'll have overlapping runs.

Hourly Schedules

ScheduleExpression
Every hour (at :00)0 * * * *
Every hour at :3030 * * * *
Every 2 hours0 */2 * * *
Every 6 hours0 */6 * * *
Every 12 hours0 */12 * * *

Daily Schedules

ScheduleExpression
Midnight0 0 * * *
6:00 AM0 6 * * *
9:00 AM0 9 * * *
Noon0 12 * * *
5:00 PM0 17 * * *
9:30 AM30 9 * * *
Twice daily (9 AM and 6 PM)0 9,18 * * *

Weekly Schedules

ScheduleExpression
Every Monday at 9 AM0 9 * * 1
Every Friday at 5 PM0 17 * * 5
Weekdays at 9 AM0 9 * * 1-5
Weekends at midnight0 0 * * 0,6
Sunday at midnight0 0 * * 0
Mon, Wed, Fri at 8 AM0 8 * * 1,3,5

Day-of-week numbering: 0 = Sunday, 1 = Monday, ..., 6 = Saturday, 7 = Sunday (again). Both 0 and 7 are Sunday. Use names (MON, TUE) if your system supports them.

Monthly and Yearly Schedules

ScheduleExpression
1st of every month at midnight0 0 1 * *
15th of every month at 9 AM0 9 15 * *
Every quarter (Jan, Apr, Jul, Oct)0 0 1 1,4,7,10 *
January 1st at midnight0 0 1 1 *
Last day of monthNot possible in standard cron*

*Standard 5-field cron cannot express "last day of month." Some schedulers (Quartz, AWS EventBridge) support the L character: 0 0 L * *. For standard cron, use a wrapper script that checks if tomorrow is the 1st.

Business Hours Pattern

This is the most common real-world pattern — run during office hours on workdays:

*/15 9-17 * * 1-5

This means: every 15 minutes, between 9:00 AM and 5:59 PM, Monday through Friday. Perfect for health checks, sync jobs, or dashboard refreshes that only matter during business hours.

Platform Differences

Not all cron implementations are identical:

When in doubt, paste your expression into our Cron Tester to see the next run times before deploying.

Common Mistakes

Quick Reference: Day-of-Week Numbers

NumberDayNumberDay
0Sunday4Thursday
1Monday5Friday
2Tuesday6Saturday
3Wednesday7Sunday

Frequently Asked Questions

How do I test a cron expression before deploying?
Paste it into our Cron Tester to see a human-readable description and the next 5-10 run times. Or use Cron Builder to construct one visually.

Can cron run a job every 45 seconds?
No — standard cron's smallest unit is one minute. For sub-minute scheduling, use a loop inside the script, systemd timers, or a scheduler that supports seconds (like Quartz).

Does 0 */2 * * * run at every even hour or every 2 hours from midnight?
Every even hour: 0:00, 2:00, 4:00, 6:00... The step is anchored to the field's minimum (0 for hours). It does not mean "every 2 hours from when the job was created."

How do I run a job on the last day of every month?
Standard cron can't express this directly. Use a script wrapper: [ "$(date +\%d -d tomorrow)" = "01" ] && /path/to/job.sh. Or use a scheduler that supports the L character.

Test your cron expression instantly — free

Paste any cron expression and see the next run times plus a human-readable description. Runs 100% in your browser.

Cron Tester → Cron Builder →