Cron Expression Parser
Parse and understand cron expressions. Convert cron syntax to human-readable descriptions and visualize when your scheduled tasks will run.
Format: minute hour day-of-month month day-of-week (e.g., "0 15 * * 1-5" = 3pm on weekdays)
Table of Contents
What is a Cron Expression?
A cron expression is a string that defines a schedule for recurring tasks. It consists of five fields separated by spaces that specify when a task should run: minute, hour, day of month, month, and day of week.
Cron expressions are widely used in Unix-like operating systems, task schedulers, CI/CD pipelines, and automation tools to schedule jobs, scripts, and maintenance tasks.
Example: The expression 0 15 * * 1-5 means "at 3:00 PM (15:00)
on weekdays (Monday through Friday)".
Cron Format
A cron expression has five fields:
| Field | Allowed Values | Description |
|---|---|---|
| Minute | 0-59 | Minute of the hour |
| Hour | 0-23 | Hour of the day (24-hour format) |
| Day of Month | 1-31 | Day of the month |
| Month | 1-12 | Month of the year |
| Day of Week | 0-6 | Day of the week (0 = Sunday, 6 = Saturday) |
Each field can contain numbers, ranges, lists, wildcards, and step values to create flexible schedules.
Common Examples
0 0 * * * Every day at midnight (00:00)
0 15 * * 1-5 Every weekday at 3:00 PM
0 9 * * 1 Every Monday at 9:00 AM
0 */6 * * * Every 6 hours (at minute 0)
0 0 1 * * First day of every month at midnight
0 0 * * 0 Every Sunday at midnight
*/15 * * * * Every 15 minutes
0 0 1 1 * January 1st at midnight (New Year)
Special Characters
Asterisk (*)
Represents "every" value. For example, * in the hour field means "every hour".
Comma (,)
Separates multiple values. For example, 1,3,5 means "1, 3, or 5".
Hyphen (-)
Defines a range. For example, 1-5 means "1 through 5".
Slash (/)
Defines step values. For example, */5 in the minute field means "every 5 minutes", and 0-30/5 means "every 5 minutes
from 0 to 30".
Use Cases
- Automated Backups: Schedule daily or weekly backups of databases and files
- System Maintenance: Run cleanup scripts, log rotation, and system updates
- CI/CD Pipelines: Schedule automated builds, tests, and deployments
- Data Synchronization: Sync data between systems at regular intervals
- Monitoring and Alerts: Run health checks and send notifications
- Report Generation: Generate and email reports on a schedule
- Cache Clearing: Clear caches at off-peak hours
- Database Maintenance: Run optimization and cleanup tasks
Frequently Asked Questions
Day-of-month (1-31) specifies a specific day of the month (e.g., the 15th of every month). Day-of-week (0-6) specifies a day of the week (e.g., every Monday). If both are specified (not wildcards), the task runs when either condition is met. If both are wildcards (*), the task runs every day.
Yes, but be aware that different systems may have variations. Unix/Linux cron uses 5 fields (minute, hour, day-of-month, month, day-of-week). Some systems support 6 fields (adding seconds) or use different day-of-week numbering (some start with 1 for Monday). Always check your system's documentation.
Use the step operator (/). For example, */15 * * * * runs every 15 minutes, and 0 */2 * * * runs every 2 hours
(at minute 0).
Yes! You can use commas to combine ranges and individual values. For example, 1-5,10,15-20 means "1 through
5, 10, and 15 through 20".
The parser uses your browser's local timezone. All times displayed are in your local time. When using cron expressions in production systems, make sure to consider timezone settings.
The next run times are calculated based on the current time and the cron expression. They show when the task would execute if the cron scheduler were running continuously. Actual execution may vary based on system load and scheduler implementation.