Cron Expressions: A Field-by-Field Guide with Real Examples
Read and write cron like a native: what the 5 fields mean, steps and ranges, the day-of-month vs day-of-week rule, @daily shorthands and timezone pitfalls.
Cron is still the scheduling language of servers, CI pipelines and Kubernetes CronJobs — and still the source of countless why did it run at midnight? moments. The syntax fits in one screen once the fields click.
The five fields, left to right
- minute 0-59
- hour 0-23
- day of month 1-31
- month 1-12
- day of week 0-7 (0 and 7 are both Sunday)
An asterisk means every value, a list picks several, a range spans, and a step (*/5) filters. So */15 9-17 * * 1-5 reads: every 15 minutes, from 9 to 17, every day, every month, Monday to Friday.
The one rule that trips everyone
When both day-of-month and day-of-week are restricted, standard Vixie cron runs the job on days matching either — not both. That surprise is behind most phantom schedules. Verify any expression in the Cron Expression Parser, which explains the rule and previews upcoming run times.
Shorthands and modern dialects
@hourly,@daily,@weekly,@monthly,@yearly— readable equivalents of common patterns.- Quartz uses 6 fields (adds seconds) and different day names — a frequent porting bug.
Time zones: the silent schedule killer
Cron evaluates in the server time zone. A container running UTC shifts every 0 9 * * * job by hours versus your wall clock. When coordinating schedules across systems, convert the run times with the Unix Timestamp Converter and log the actual epoch of each execution.
Before pasting into crontab, a quick pass through the parser catches reversed fields, off-by-one day names and impossible dates like February 30.
Related guides
Unix Timestamps, Epochs and Time Zones: The Developer Field Guide
Seconds vs milliseconds confusion, ISO 8601, why local time is a display concern, leap-second trivia and a debugging workflow for wrong dates.
Read guide →2026-10-12Base64 vs Hex Encoding: When to Use Each (Developer Guide)
Base64 vs hex encoding compared: size overhead, readability, common use cases in JWTs, data URLs and git diffs — with a quick decision table for engineers.
Read guide →2026-10-11How to Decode a JWT: Reading Header, Payload and Signature
Decode any JWT by hand or with a browser tool: how the three parts are encoded, which claims matter (sub, exp, iss, aud) and why decoding is not verification.
Read guide →Try these tools
Cron Expression Parser
Parse a 5-field cron expression into plain English, validate every field, and preview the next scheduled run times. All offline — supports *, ranges, steps and lists.
Open tool →Unix Timestamp Converter
Convert Unix timestamps (seconds or milliseconds) to human dates in local time, UTC and ISO — and dates back to epoch seconds. Copyable, live “now” button.
Open tool →