Cron Expression Explainer & Schedule Calculator
Parse, translate, and explain standard 5-field and 6-field cron expressions into plain English. Computes the next 5 upcoming execution timestamps with interactive field breakdowns.
100% Secure & Client-Side: Evaluated entirely in your local browser runtime. Zero server telemetry or scheduled tasks created.
Every 2 hours, on the hour
Field Structure Breakdown
At minute 0
Every 2 hours
Every day of the month
Every month
Every day of the week
Upcoming Scheduled Executions (Next 5 Runs)Calculated from local browser time
| Run # | Exact Local Date & Time | UTC Timestamp | Relative Horizon |
|---|
The Architecture of Unix Cron and Scheduled Task Orchestration
The Unix cron time-based job scheduler traces its lineage to the pioneering days of Bell Laboratories, originally written by computer scientist Brian Kernighan for Version 7 Unix in 1979. Modern Linux, macOS, and BSD operating systems rely predominantly on Vixie Cron, an open-source reimplementation developed by Paul Vixie in 1987, and formalized under the POSIX.1-2008 / IEEE Std 1003.1 standard.
At its architectural core, the cron daemon (crond) awakens once every 60 seconds at the top of the minute (second :00), reads system crontabs (such as /etc/crontab and /var/spool/cron/crontabs), and evaluates whether the current minute, hour, day-of-month, month, and day-of-week match any scheduled task expressions. If a match occurs, the daemon forks an asynchronous sub-process with the user's execution shell environment.
The Anatomy of the 5-Field and 6-Field Cron Expressions
Standard crontab expressions consist of five space-delimited fields representing temporal dimensions of increasing magnitude:
* * * * *│ │ │ │ ││ │ │ │ └─────── Day of Week (0 - 6) (0 = Sunday, 1 = Monday ... 6 = Saturday; 7 = Sunday in some flavors)│ │ │ └────────── Month of Year (1 - 12) (1 = Jan, 2 = Feb ... 12 = Dec)│ │ └─────────── Day of Month (1 - 31)│ └──────────── Hour of Day (0 - 23) (24-hour military notation)└───────────── Minute of Hour (0 - 59)Special Operators and Wildcards Defined
- Asterisk (
*): Wildcard denoting every valid numerical unit in that field's range. For example,*in the month position indicates every month from January through December. - Comma (
,): Enumeration separator specifying a discrete list of explicit values. For example,1,15,30in the minute column executes exclusively at minute 1, minute 15, and minute 30. - Hyphen (
-): Contiguous range operator. For instance,9-17in the hour field triggers on every hour from 9:00 AM through 5:00 PM inclusive. - Slash (
/): Step interval increment. Often combined with an asterisk or range, such as*/10in minutes to trigger every 10 minutes (0, 10, 20, 30, 40, 50), or10-30/5to trigger every 5 minutes between minutes 10 and 30. - Question Mark (
?): Non-specific wildcard used in enterprise engines (such as Quartz and AWS EventBridge) where specifying both Day of Month and Day of Week is disallowed. In those systems, setting one field to?delegates scheduling authority to the other.
Cron Flavor Comparison: POSIX vs Quartz vs AWS EventBridge
| Feature / Dimension | Standard POSIX / Linux Cron | Quartz Scheduler (Java / Spring) | AWS EventBridge / CloudWatch |
|---|---|---|---|
| Field Count | 5 fields | 6 or 7 fields (+seconds, +year) | 6 fields (+year) |
| Seconds Precision | No (Minute minimum) | Yes (First field) | No (Minute minimum) |
| Sunday Representation | 0 or 7 | 1 (1 = Sun ... 7 = Sat) | 1 (1 = Sun ... 7 = Sat) or SUN |
| Day of Month & Week Relationship | Logical OR (Either condition matches) | Mandatory ? on unconstrained field | Mandatory ? on unconstrained field |
| Special Modifiers (L, W, #) | Unsupported in standard crond | Supported (e.g. 5L, 3#2) | Supported (e.g. 5L, 3#2) |
Critical Production Gotchas: Daylight Saving Time and Clock Drift
In distributed enterprise cloud environments, misconfigured cron expressions can trigger devastating cascading failures. Engineers should adhere to these defensive rules:
- Never Schedule on Local Timezones with DST: If an operational billing job runs at
0 2 * * *(2:00 AM local time), on the spring DST changeover day when 2:00 AM does not exist, the job will fail to trigger. In the autumn when 2:00 AM occurs twice, the job will duplicate charges. Always set server hardware clocks and cron orchestration engines toUTC. - Prevent Stampeding Herds via Jitter: If 500 microservices all execute cache invalidation or batch database maintenance at
0 0 * * *(midnight UTC), database connections spike simultaneously. Modern orchestrators recommend adding random jitter (e.g. executing at varying minute offsets) to flatten throughput peaks. - Overlapping Job Execution Guarding: By default, cron starts a new process regardless of whether the previous instance is still running. Long-running batch queries can pile up into thread exhaustion. Wrap commands in POSIX file locking utilities:
flock -n /var/lock/myjob.lock /usr/bin/myjob.sh.