Cron Parser: Explain Cron Expressions
Explain complex CRON expressions with human-readable descriptions.
Common Presets
Related Tools
- 1Enter a CRON expression in the format: minute hour day month weekday
- 2Click a preset button to load common CRON expressions
- 3View the human-readable description and detailed breakdown
- 4Copy the description for documentation or sharing
The CRON Expression Parser converts complex CRON syntax into human-readable descriptions. It supports standard 5-field CRON expressions with wildcards, ranges, intervals, and lists. Perfect for developers, system administrators, and DevOps engineers who need to understand or document scheduled tasks. All processing happens client-side for maximum security.
Frequently Asked Questions (FAQ)
How do I parse and understand an existing cron expression?
Enter a cron expression in minute hour day month weekday format, or load a preset. The parser shows a human-readable description and a field-by-field breakdown you can copy.
What is the CRON expression format?
The standard CRON format has 5 fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday). Each field can use wildcards (*), ranges (1-5), intervals (*/5), or lists (1,3,5).
What does the asterisk (*) mean in CRON?
The asterisk (*) means "every" or "all possible values". For example, * in the minute field means "every minute", and * in the hour field means "every hour".
How do I schedule a task to run every 5 minutes?
Use the interval syntax: */5 * * * *. This means "every 5 minutes of every hour of every day". You can also use /n for any interval like */10 for every 10 minutes.
What is the difference between day of month and day of week?
Day of month (1-31) specifies the date in the month, while day of week (0-6) specifies the day of the week. If both are specified (not *), the task runs when either condition is met (OR logic, not AND).
Does this parser support 6-field CRON expressions?
This parser supports the standard 5-field CRON format. Some systems use 6-field formats that include seconds as the first field, but this tool focuses on the most common 5-field format used by Linux cron and most scheduling systems.
Complete Guide to CRON Expressions
CRON expressions are the backbone of task scheduling on Unix-like systems. The CRON Expression Parser at ByteKit helps you understand, validate, and document CRON expressions with human-readable descriptions. All processing happens client-side for maximum security.
Understanding CRON Syntax
Five-Field Format
Standard CRON uses five fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6). Each field specifies when the task should run. Understanding each field's range and meaning is essential for creating accurate schedules.
Wildcards (*)
The asterisk means "every" or "all possible values". * in the minute field means every minute, * in the hour field means every hour. This is the most common way to specify that a task should run at every possible time within a field's range.
Ranges (-)
Use hyphens to specify ranges. 1-5 means values 1 through 5 inclusive. 9-17 means hours 9 through 17. Ranges are inclusive of both endpoints. This is useful for specifying business hours or specific date ranges.
Intervals (/)
Use slashes to specify intervals. */5 means every 5 units. 0-20/2 means every 2 units from 0 to 20. Intervals are powerful for repeating tasks at regular intervals like every 5 minutes or every 2 hours.
Lists (,)
Use commas to specify multiple discrete values. 1,3,5 means values 1, 3, and 5. MON,WED,FRI means Monday, Wednesday, and Friday. Lists are useful for specifying specific times or days that don't form a pattern.
Common CRON Patterns
Every Minute
* * * * * - Runs every minute of every hour. This is the most frequent schedule possible and should be used cautiously as it can overwhelm systems.
Every Hour
0 * * * * - Runs at minute 0 of every hour. This is useful for hourly tasks like generating reports or cleaning temporary files.
Daily at Midnight
0 0 * * * - Runs at 00:00 (midnight) every day. Perfect for daily backups, log rotation, or data aggregation tasks.
Weekdays at 9 AM
0 9 * * 1-5 - Runs at 9:00 AM Monday through Friday. Ideal for business-day tasks like sending reports or starting workday processes.
First of Month
0 0 1 * * - Runs at midnight on the first day of every month. Useful for monthly billing cycles, reports, or maintenance tasks.
Advanced Techniques
Combining Special Characters
You can combine wildcards, ranges, intervals, and lists in a single field. For example, 1,3,5-7/2 means values 1, 3, and then every 2 from 5 to 7 (5, 7). Complex combinations allow precise control over when tasks run.
Predefined Schedules
Some CRON implementations support special strings like @yearly, @monthly, @weekly, @daily, @hourly. These are shortcuts for common schedules. @daily is equivalent to 0 0 * * * and @hourly is equivalent to 0 * * * *.
Day of Week vs Day of Month
When both day of month and day of week are specified (not *), CRON uses OR logic - the task runs when either condition is met. This means 0 0 15 * 1 runs on the 15th of every month AND every Monday, not just the 15th if it's a Monday.
Hash (#) for Nth Day
Some implementations support # to specify the nth occurrence of a weekday. 1#3 means the third Monday of the month. This is useful for scheduling tasks on specific occurrences like the first Friday or last Wednesday.
Last (L) for Last Day
Some implementations support L to specify the last day of the month. L in the day field means the last day of the month. This accounts for varying month lengths (28, 29, 30, or 31 days).
The CRON Expression Parser uses advanced algorithms to convert complex CRON syntax into human-readable descriptions. Perfect for developers, system administrators, and DevOps engineers. All processing happens client-side for maximum security.