* 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 5 minutes
Health check polling, cache warming, high-frequency metric collection.
At the start of every hour
Hourly report generation, token refresh, summary aggregation.
Daily at midnight
Nightly database backups, log rotation, daily digest emails.
Weekdays at 9 AM
Business-hours jobs — morning reports, daily standups triggered, market open alerts.
First day of every month at midnight
Monthly billing cycles, subscription renewals, monthly reporting.
Every 15 minutes
Queue draining, short-lived cache TTL refresh, frequent metric snapshots.
Every Friday at 6:30 PM
End-of-week summaries, weekend deployment freezes, weekly backup verification.
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.