Cron expression cheat sheet (5 fields)
A cron expression is a compact schedule string used by Unix cron and many CI/job runners.TryDevSnip is a free developer toolkit in the Try family by Samson PG. TheCron Helper explains expressions and previews next runs in your browser — nothing is uploaded.
Field order
Left to right for classic five-field cron:
| Position | Field | Allowed values | Notes |
|---|---|---|---|
| 1 | Minute | 0–59 | First field |
| 2 | Hour | 0–23 | 24-hour clock |
| 3 | Day of month | 1–31 | dom |
| 4 | Month | 1–12 | Or JAN–DEC on some crons |
| 5 | Day of week | 0–7 or SUN–SAT | Numbering varies by system |
Special characters
| Char | Meaning | Example |
|---|---|---|
| * | Any value | * in hour = every hour |
| , | List | 1,15 in minute = at :01 and :15 |
| - | Range | 9-17 in hour = 9 through 17 |
| / | Step | */5 in minute = every 5 minutes |
Common presets
| Goal | Expression | Plain English |
|---|---|---|
| Every minute | * * * * * | Fires every minute |
| Every 5 minutes | */5 * * * * | :00, :05, :10, … |
| Hourly | 0 * * * * | At minute 0 of every hour |
| Daily midnight | 0 0 * * * | 00:00 every day (scheduler TZ) |
| Weekdays 9am | 0 9 * * 1-5 | Mon–Fri at 09:00 (dow numbering varies) |
| Monthly 1st | 0 0 1 * * | Midnight on day 1 of each month |
Timezone trap
Cron usually runs in the scheduler’s timezone (often UTC on cloud hosts), not the timezone shown on your laptop. “Midnight” on the host may be afternoon where you live. Confirm TZ in the platform docs, or convert wall-clock times with theTimestamp Converter before you ship the expression.
Try tools & guides on TryDevSnip
- Cron Helper — plain-English explain + next runs
- Timestamp Converter — UTC vs local for schedule checks
- Cron every 5 minutes explained
- Cron every hour and midnight explained
- Cron weekdays at 9am explained
- Cron timezone: UTC vs local next runs
Frequently asked questions
Is cron 5 fields or 6 fields?
Classic Unix cron uses five fields: minute, hour, day-of-month, month, day-of-week. Some systems (Quartz, Spring, Kubernetes CronJob with seconds) add a leading seconds field — that is six (or more) fields. If an expression “looks right” but never fires, count the fields and check your scheduler’s docs.
Does @hourly work everywhere?
No. Nicknames like @hourly, @daily, and @weekly are Vixie/cronie conveniences. Many managed schedulers and libraries only accept numeric five-field expressions. Prefer 0 * * * * for “every hour at minute 0” when you need portability.
Is day-of-week 0 Sunday or Monday?
It depends on the implementation. In many Unix crons, 0 and 7 are Sunday and 1 is Monday. Others document Monday as 1 with Sunday as 7 only. Always confirm numbering (and whether both day-of-month and day-of-week can be set together) for your scheduler.
Why did my cron fire at the wrong local time?
Most servers evaluate cron in the scheduler’s timezone (often UTC), not your laptop’s clock. A “9am weekdays” expression on a UTC host is 9:00 UTC. Convert with a timestamp tool, or set the job’s TZ explicitly if the platform supports it.