Cron Expressions Explained Writing Schedules Without Losing Your Mind
A practical reference for cron syntax: the five fields, special characters, 10 ready-to-use expressions, and a cron expression generator to build and verify your schedules without guessing.
Cron schedules tasks on Unix-like systems. The syntax — five whitespace-separated fields — looks simple until you need to run something every 15 minutes on weekdays and can’t remember whether that’s field two or three. This is the reference you keep open.
The 5-Field Format
Every cron expression has exactly five fields, separated by spaces, in this order:
┌─────────────── minute (0–59)
│ ┌─────────────── hour (0–23)
│ │ ┌─────────────── day of month (1–31)
│ │ │ ┌─────────────── month (1–12)
│ │ │ │ ┌─────────────── day of week (0–7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Fields Reference
| Field | Allowed Values | Special Characters | Example |
|---|---|---|---|
| Minute | 0–59 | * , – / | */15 = every 15 min |
| Hour | 0–23 | * , – / | 9-17 = 9am to 5pm |
| Day of Month | 1–31 | * , – / ? | 1 = 1st of month |
| Month | 1–12 | * , – / | */3 = every quarter |
| Day of Week | 0–7 (0=Sun) | * , – / ? | 1-5 = Mon–Fri |
Special Characters
- * — wildcard, matches any value in that field
- , — list separator:
1,3,5in day-of-week means Monday, Wednesday, Friday - – — range:
9-17in the hour field means 9am through 5pm - / — step:
*/15in the minute field means every 15 minutes;2/3means every 3rd value starting from 2 - ? — no specific value (day-of-month or day-of-week only, used by Quartz/Spring schedulers)
Common Cron Expressions
| Expression | Description |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
*/15 * * * * | Every 15 minutes |
0 * * * * | Every hour, on the hour |
0 0 * * * | Every day at midnight |
0 9 * * 1-5 | 9am every weekday |
0 9-17 * * 1-5 | Every hour from 9am–5pm, weekdays only |
0 0 * * 0 | Every Sunday at midnight |
0 0 1 * * | Midnight on the 1st of each month |
0 0 1 1 * | Midnight on January 1st |
Three Real-World Examples
1. Database backup at midnight
0 0 * * *
Minute 0, hour 0, every day. Fires once at 00:00 — clean, predictable, and out of the way during peak hours.
2. API sync every 15 minutes
*/15 * * * *
*/15 in the minute field means “step by 15, starting at 0” — fires at :00, :15, :30, and :45 of every hour. All other fields are *, so it runs around the clock.
3. Weekly cleanup — Monday at 6am
0 6 * * 1
Minute 0, hour 6, any day of month, any month, day-of-week 1 (Monday). Runs once a week. Change 1 to 5 if Fridays work better for your team.
Build and Verify Your Schedule
Memorizing every combination isn’t the point — knowing where to look is. Use the Cron Expression Generator to set fields visually and watch the expression form as you go. Once you have a candidate expression, paste it into the Cron Next Run Calculator to confirm it fires on exactly the dates and times you expect before you deploy.
Five fields, four special characters, two tools to check your work — that’s everything you need to schedule anything reliably.
Install Our Extensions
Add IO tools to your favorite browser for instant access and faster searching
恵 Scoreboard Has Arrived!
Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!
Must-Try Tools
View All New Arrivals
View AllUpdate: Our latest tool was added on Apr 22, 2026
