Guide
What is a Cron Expression? Syntax Explained with Examples
A cron expression is a string of five fields that defines a recurring schedule for automated tasks. Learn the cron syntax field by field, understand special characters like * / , -, and see real examples for common schedules.
The anatomy of a cron expression
A standard cron expression has five space-separated fields. Each field represents a unit of time. Together they define exactly when a task should run.
* * * * *
minute
(0–59)
(0–59)
hour
(0–23)
(0–23)
day
(1–31)
(1–31)
month
(1–12)
(1–12)
weekday
(0–6)
(0–6)
| Field | Range | Example value | Meaning |
|---|---|---|---|
| Minute | 0–59 | 30 | At minute 30 |
| Hour | 0–23 | 9 | At 09:xx (9am) |
| Day of month | 1–31 | 15 | On the 15th |
| Month | 1–12 | 6 | In June |
| Day of week | 0–6 | 1 | On Monday (0=Sunday) |
Special characters
*Wildcard
Matches every value in the field. In the minute field, * means every minute.
/Step
*/5 in the minute field means every 5 minutes. 1-30/2 means every 2 minutes from minute 1 to 30.
,List
1,3,5 in the day-of-week field means Monday, Wednesday, and Friday.
-Range
9-17 in the hour field means every hour from 9am to 5pm inclusive.
Common cron expression examples
| Expression | Schedule |
|---|---|
| * * * * * | Every minute |
| */5 * * * * | Every 5 minutes |
| 0 * * * * | Every hour (at :00) |
| 0 9 * * * | Every day at 9:00am |
| 0 9 * * 1-5 | Weekdays at 9:00am |
| 0 0 * * 0 | Every Sunday at midnight |
| 0 0 1 * * | First day of every month at midnight |
| 0 0 1 1 * | Once a year — 1st January at midnight |
| 30 8 * * 1,3,5 | Mon, Wed, Fri at 8:30am |
| 0 */6 * * * | Every 6 hours |
Platform differences
The basic 5-field syntax is standard, but different systems extend it in different ways:
- Linux crontab — 5 fields; also supports
@yearly,@monthly,@weekly,@daily,@hourlyshortcuts - GitHub Actions — 5-field standard cron, runs in UTC
- AWS EventBridge — 6 fields (adds seconds); uses
?instead of*when day-of-month and day-of-week conflict - Quartz / Spring — 6 or 7 fields (seconds, and optional year)
- Kubernetes CronJob — 5-field standard; minimum interval is 1 minute
Build and validate cron expressions interactively
See a human-readable description and the next 8 run times instantly
Open Cron Expression Builder →