Introduction
Cron expressions are compact, powerful, and notoriously hard to read. A string like `0 18 * * 1-5` means 'at 6:00 PM every weekday' but you would not know that at a glance. This tool translates any 5-field cron expression into plain English, breaks down each field, and explains the special characters (* , - / L W #). It includes 15 preset expressions for common scheduling patterns. Paste your cron string and the description appears instantly.
What this tool does
- Parse standard 5-field cron expressions (minute hour day-of-month month day-of-week) and produce a natural language description
- Handle all special characters: asterisk (every), comma (list), hyphen (range), slash (step), L (last day), W (nearest weekday), and # (nth weekday of month)
- Accept month names (JAN-DEC) and day names (SUN-SAT) in addition to numeric values, with 3-letter prefix matching
- Provide a field-by-field breakdown showing the raw value and its English translation for each of the 5 fields
- Include 15 preset expressions covering common patterns like every minute, every 5 minutes, daily at midnight, weekdays at 6 PM, last day of month, and nth weekday
- Format clock times in 12-hour AM/PM notation when both minute and hour are single values
How this tool works
The tool splits the input on whitespace and expects exactly 5 fields. Each field is parsed independently using a priority-ordered set of pattern matchers.
The asterisk `*` matches every value in the field's range. Step values like `*/5` produce 'every 5 minutes'. Ranges like `1-5` produce '1 through 5'. Lists like `1,3,5` produce '1, 3, and 5' with proper Oxford comma handling. The tool also handles range-step combinations like `9-17/2` (every 2 hours from 9 to 17).
Special characters are handled per field type. `L` in the day-of-month field means the last day of the month. `5L` in the day-of-week field means the last Friday. `15W` in the day-of-month field means the nearest weekday to the 15th. `1#3` in the day-of-week field means the third Monday.
The natural language builder assembles the description by combining the time portion (minute and hour), the day-of-month portion, the month portion, and the day-of-week portion. When both day-of-month and day-of-week are specified, it uses 'and on' to join them, matching the semantics where both conditions must be satisfied (in most cron implementations, this is an OR, but the description clarifies the intent).
How cron expressions work (POSIX.1-2017)
The cron daemon was created by Ken Thompson at Bell Labs in the 1970s as part of Unix. The 5-field format (minute hour day-of-month month day-of-week) is specified in the crontab man page and codified in POSIX.1-2017, which defines the utilities section of the POSIX standard.
Each field has a fixed range. Minute: 0-59. Hour: 0-23. Day of month: 1-31. Month: 1-12 (or JAN-DEC). Day of week: 0-7 (or SUN-SAT, where both 0 and 7 represent Sunday). The asterisk is a wildcard meaning 'every value in the range'.
The special characters L, W, and # are not part of POSIX but are widely supported extensions, implemented by cron implementations like Quartz Scheduler (Java), cronie (Linux), and cloud schedulers like AWS EventBridge and Google Cloud Scheduler. L stands for 'last', W stands for 'nearest weekday', and # specifies the nth occurrence of a weekday in a month.
A common source of confusion is the interaction between day-of-month and day-of-week. In Vixie cron (the most common Linux implementation), if both fields are restricted (not `*`), the command runs when either condition is met (OR logic). In POSIX, the behavior is unspecified. The tool's description uses 'and on' to indicate both conditions are present, but the actual execution semantics depend on your cron implementation.
For parsing cron expressions programmatically, see the Cron Expression Parser. For testing regex patterns used in text processing, use the Regex Escaper. For converting between Unix timestamps and human-readable dates, see the Timestamp Converter.
How to use this tool
- Enter a 5-field cron expression in the input field, e.g. `*/15 9-17 * * 1-5` for every 15 minutes during business hours on weekdays
- The output shows the plain English description at the top, e.g. 'At every 15th minute past every hour from 9 through 17, Monday through Friday'
- Review the field breakdown to see how each of the 5 fields was interpreted individually
- Use the preset dropdown to load common expressions like 'Every day at midnight' (`0 0 * * *`) or 'Last day of every month' (`59 23 L * *`)
- Experiment with special characters: try `0 0 15W * *` for the nearest weekday to the 15th, or `0 0 * * 1#3` for the third Monday
- Check the field order reference at the bottom of the output: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC), day of week (0-7 or SUN-SAT)
Real-world examples
Scheduling a nightly database backup
Input: `0 2 * * *`. Description: 'At 2:00 AM every day'. This runs the backup job at 2 AM regardless of the day of the week or month. It is the most common pattern for nightly maintenance tasks.
Business hours polling with step values
Input: `*/15 9-17 * * 1-5`. Description: 'At every 15th minute past every hour from 9 through 17, Monday through Friday'. This polls every 15 minutes between 9 AM and 5 PM on weekdays only, which is useful for stock price checks or API health monitoring during business hours.
Last day of the month with L
Input: `59 23 L * *`. Description: 'At 11:59 PM on the last day of the month'. The L character dynamically computes the last day (28, 29, 30, or 31 depending on the month and year). This is useful for monthly report generation or end-of-month cleanup jobs.
Third Monday of every month with #
Input: `0 9 * * 1#3`. Description: 'At 9:00 AM on the third Monday of the month'. The # syntax specifies the nth occurrence of a particular weekday. This is useful for scheduling recurring meetings or patching windows that fall on specific weeks of the month.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| 5-field cron (POSIX) | minute hour dom month dow | Standard Unix/Linux crontab, most schedulers |
| 6-field cron (Quartz) | second minute hour dom month dow | Java Quartz Scheduler, Spring Boot |
| 7-field cron (Quartz extended) | second minute hour dom month dow year | Quartz with explicit year field |
| AWS EventBridge cron | 5-field with fixed field meanings | AWS scheduled rules (requires ? in one of dom/dow) |
| Human-readable (this tool) | Natural language output | Understanding and verifying cron expressions |
Limitations or considerations
This tool parses the standard 5-field format. It does not support the 6-field format (with seconds) used by Quartz Scheduler or the 7-field format (with year). If you paste a 6-field expression, the tool will report an error about expecting 5 fields.
The L, W, and # special characters are not part of POSIX. They are supported by Quartz, cronie, and some cloud schedulers, but not by all cron implementations. Check your specific scheduler's documentation before relying on these characters.
The tool does not compute the next execution time. For that, use the Cron Expression Parser, which calculates upcoming fire times.
The tool does not handle timezone conversion. Cron expressions execute in the timezone of the host system or the scheduler's configured timezone. For AWS EventBridge, you can specify a timezone in the rule definition.
The description for day-of-month and day-of-week both being restricted uses 'and on', but the actual execution semantics (OR vs AND) vary by implementation. Vixie cron uses OR, while some other implementations use AND.
Frequently asked questions
What do the 5 fields in a cron expression represent?
From left to right: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC), and day of week (0-7 or SUN-SAT, where 0 and 7 both mean Sunday). An asterisk in any field means 'every value in that field's range'.
What is the difference between L and W in cron?
L means 'last'. In the day-of-month field, `L` is the last day of the month (28, 29, 30, or 31). In the day-of-week field, `5L` means the last Friday. W means 'nearest weekday'. `15W` in the day-of-month field means the nearest weekday (Monday-Friday) to the 15th of the month.
How does the # character work in cron?
The # character specifies the nth occurrence of a weekday in a month. `1#3` in the day-of-week field means the third Monday (1 = Monday, 3 = third occurrence). `5#1` means the first Friday. This is useful for scheduling tasks on specific weeks of the month.
Why does my cron expression run on both day-of-month and day-of-week?
In Vixie cron (the standard Linux implementation), when both day-of-month and day-of-week are restricted (not *), the command runs when either condition is met. This is OR logic. Some other implementations use AND logic. Check your cron daemon's documentation to confirm the behavior.
Does this tool support 6-field cron with seconds?
No, this tool parses the standard 5-field format. The 6-field format (with a seconds field at the beginning) is used by Quartz Scheduler in Java. If you need to parse 6-field expressions, check the documentation for your specific scheduler.
Conclusion
Cron expressions are a compact scheduling syntax that has survived from 1970s Unix to modern cloud schedulers. This tool translates them into plain English so you can verify your schedules before deploying them. For computing the next execution time of a cron expression, use the Cron Expression Parser. For regex-based text processing, see the Regex Escaper. For converting between Unix timestamps and readable dates, use the Timestamp Converter.