Cron Expression Parser
Parse and explain cron expressions. See when your cron job will run next and get a human-readable description.
Understanding Cron Syntax
A cron expression is a string of five fields separated by spaces. Cron is used on Unix-like systems to schedule recurring tasks, such as running scripts, backups, or maintenance jobs at specified intervals. Each field represents a unit of time and controls when the job executes.
Cron Field Reference
| Field | Allowed Values | Special Characters |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of Month | 1-31 | * , - / |
| Month | 1-12 or JAN-DEC | * , - / |
| Day of Week | 0-7 (0 and 7 = Sunday) or SUN-SAT | * , - / |
Special Characters
| Character | Meaning | Example |
|---|---|---|
* | Any value (wildcard) | * * * * * = every minute |
, | Value list separator | 1,15 * * * * = minute 1 and 15 |
- | Range of values | 0 9-17 * * * = hours 9 through 17 |
/ | Step values | */10 * * * * = every 10 minutes |
How Cron Scheduling Works
The cron daemon checks the cron expression once per minute. When all five fields match the current date and time, the associated command runs. The expression 30 2 * * 0 means "at 2:30 AM every Sunday." If you use both day-of-month and day-of-week fields (neither is *), the job runs when either condition is met.
Cron expressions are used in Unix crontab files, CI/CD pipelines (GitHub Actions, GitLab CI), task schedulers like Kubernetes CronJobs, AWS EventBridge, and cloud functions. Understanding cron syntax is essential for any developer or system administrator managing scheduled tasks.