* Cron Dialect
Standard (5-Field POSIX)
* Quick Answer
The standard 5-field cron format is the original Unix scheduling syntax, supported natively by crontab on Linux, macOS, and most Unix-like systems. It covers the majority of scheduling needs — from simple intervals to complex weekday patterns — without requiring a framework-specific scheduler. Understanding standard cron is the foundation for all other dialects.
Field Reference
This dialect uses 5 fields. Fields are listed left to right as they appear in the expression.
| Position | Field | Range | Special Chars | Notes |
|---|---|---|---|---|
| 1 | Minute | 0–59 | * , - / | The minute within the hour at which the job runs. |
| 2 | Hour | 0–23 | * , - / | Uses 24-hour format. 0 = midnight, 13 = 1 PM. |
| 3 | Day of Month | 1–31 | * , - / | Day numbers are 1-based. Setting both DOM and DOW creates an OR condition. |
| 4 | Month | 1–12 | * , - / | Can also use named months: JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC. |
| 5 | Day of Week | 0–7 | * , - / | 0 and 7 both equal Sunday. Named values: SUN, MON, TUE, WED, THU, FRI, SAT. |
Special Characters
Standard cron uses four special characters. The asterisk (*) matches all valid values for that field. A comma (,) separates a list of values, e.g. 1,3,5. A hyphen (-) defines a range, e.g. 1-5 for Monday through Friday. A forward slash (/) defines a step interval — */5 means every 5 units, while 10/5 means every 5 units starting at 10.
Examples
Every single minute, endlessly throughout the day, every day of the year.
Running a task every minute introduces severe operational risks if not managed carefully. The primary hazard is job overlapping, where a execution takes longer…
Every ten minutes, continuously throughout the day, every day of the week, and every month of the year.
Running jobs at a ten-minute frequency introduces specific architectural considerations, particularly around task overlap and resource exhaustion. If a job…
Every fifteen minutes, at the start of each quarter-hour interval.
Running a task at a fifteen-minute frequency is a common design pattern in distributed systems for medium-priority background workers, such as cache…
Every two minutes, continuously throughout every day.
Running a task every two minutes introduces unique operational challenges. The primary risk is job overlap, where a previous execution takes longer than 120…
Every three minutes
Running tasks at a 3-minute interval introduces several critical operational considerations, primarily centered around task overlap and resource exhaustion. In…
Every half hour, running on the hour and thirty minutes past the hour, every day.
Executing tasks every thirty minutes introduces distinct operational challenges, particularly around resource contention and job overlap. At this frequency, if…
Monitor this schedule in production
Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.
Common Gotchas
DOW 0 and 7 both mean Sunday
The day-of-week field accepts 0–7 where both 0 and 7 represent Sunday. This inconsistency originated in early Unix implementations. Use 0 for maximum portability across cron implementations.
DOM and DOW combine as OR, not AND
Setting both day-of-month and day-of-week to specific values does not mean 'the 15th AND it must be a Monday'. It means 'the 15th OR any Monday'. To schedule on the first Monday of the month, you need external logic — standard cron cannot express this directly.
No seconds field
Standard cron has no seconds precision. The minimum granularity is one minute. If you need sub-minute scheduling, use Quartz (Java), a language-level timer, or run the same job multiple times within a minute using multiple cron entries.
Step values don't always divide evenly
*/7 does not fire every 7 minutes continuously — it fires at minutes 0, 7, 14, 21, 28, 35, 42, 49, 56, then resets at the start of the next hour. The steps restart from 0 each hour, not from the last firing.
Timezone is the system timezone
Standard cron always uses the system timezone of the machine it runs on. Daylight saving transitions can cause jobs to skip or run twice. If DST matters, pin your server to UTC and handle timezone conversion in your application.
Porting from Standard Cron
Standard 5-field cron is the baseline. All other dialects extend or modify it. Quartz prepends a seconds field and adds L/W/# characters. Jenkins adds the H (hash) keyword for load distribution. AWS EventBridge appends a year field and requires ? in either DOM or DOW. When porting a standard cron expression to another dialect, the field positions shift — what is minute in standard becomes the second field in Quartz.