April 6, 2026 3 min readUpdated Apr 9, 2026
Cron Expression Syntax Explained With Examples
cronschedulinglinuxdevopsbackend

What Is a Cron Expression?
A cron expression is a string of five (or six) fields that define a schedule for automated tasks. Cron jobs are used everywhere — from Linux servers running nightly backups to AWS Lambda functions and Node.js schedulers.
The classic five-field format:
* * * * *
│ │ │ │ └─ Day of week (0–7, where 0 and 7 = Sunday)
│ │ │ └─── Month (1–12)
│ │ └───── Day of month (1–31)
│ └─────── Hour (0–23)
└───────── Minute (0–59)
Field-by-Field Breakdown
Each field accepts:
- A number — exact value (e.g.
5) - An asterisk
*— every possible value - A range
a-b— every value from a to b (e.g.1-5) - A step
/n— every nth value (e.g.*/10= every 10 minutes) - A list
a,b,c— specific values (e.g.1,15,30)
Common Cron Expression Examples
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour, on the hour |
0 9 * * * | Every day at 9:00 AM |
0 9 * * 1 | Every Monday at 9:00 AM |
30 18 1 * * | 1st of every month at 6:30 PM |
*/15 * * * * | Every 15 minutes |
0 8-17 * * 1-5 | Every hour from 8 AM to 5 PM, weekdays only |
Six-Field Cron (with Seconds)
Some systems (AWS CloudWatch, Spring, many Node.js libraries) support a six-field format with a seconds field at the start:
* * * * * *
│ │ │ │ │ └─ Day of week
│ │ │ │ └─── Month
│ │ │ └───── Day of month
│ │ └─────── Hour
│ └───────── Minute
└─────────── Second (0–59)
Special Strings (Linux cron)
@reboot # Run once at startup
@hourly # Same as 0 * * * *
@daily # Same as 0 0 * * *
@weekly # Same as 0 0 * * 0
@monthly # Same as 0 0 1 * *
Real-World Use Cases
- Database backups —
0 2 * * *(every day at 2 AM) - Cache invalidation —
*/10 * * * *(every 10 minutes) - Weekly reports —
0 7 * * 1(Monday morning at 7 AM) - SSL cert renewal —
0 3 * * *(daily, off-peak) - Health checks —
*/5 * * * *(every 5 minutes)
Common Mistakes to Avoid
- Day-of-week numbering:
0and7both mean Sunday on most systems, but not all - Month is 1-indexed: January =
1, not0 - Timezone confusion: Cron runs in the system timezone — often UTC on servers
Validate Your Cron Expressions Instantly
Building cron schedules by hand is error-prone. Use the free Cron Expression Parser on konvertio.app to validate your expressions, see the next execution times, and understand what each field means.