Cron Expression Parser: Understand and Validate Cron Schedules
Cron Expression Parser: Understand and Validate Cron Schedules
Cron has scheduled jobs on Unix systems since 1975. It is also one of the most error-prone pieces of syntax in DevOps β a misplaced asterisk can mean βevery minuteβ instead of βat midnight on the 1stβ. Our Cron Expression Parser turns any expression into plain English and previews the next 5 runs.
The five fields
A standard cron expression has five space-separated fields:
ββββββββββββββ minute (0 - 59)
β ββββββββββββββ hour (0 - 23)
β β ββββββββββββββ day of month (1 - 31)
β β β ββββββββββββββ month (1 - 12)
β β β β ββββββββββββββ day of week (0 - 6) (Sunday = 0)
β β β β β
* * * * *
Special syntax
| Symbol | Meaning | Example |
|---|---|---|
* | Every value | * * * * * β every minute |
, | List of values | 0 9,12,18 * * * β at 9, 12, and 18 |
- | Inclusive range | 0 9-17 * * 1-5 β every hour 9-17 on weekdays |
/ | Step | */15 * * * * β every 15 minutes |
Common patterns
# Every minute
* * * * *
# Every 5 minutes
*/5 * * * *
# Every hour on the hour
0 * * * *
# Every day at midnight
0 0 * * *
# Every Monday at 9 AM
0 9 * * 1
# Weekdays at 8:30 AM
30 8 * * 1-5
# Every 1st of the month at noon
0 12 1 * *
# Quarterly (1st of Jan/Apr/Jul/Oct at midnight)
0 0 1 1,4,7,10 *
The classic cron pitfalls
* * * * *runs every minute, not every second. Cron has no sub-minute granularity.0 0 * * 0β0 0 * * 7in some implementations. Sunday is0; some daemons also accept7. Stick with0for portability.- Day-of-month and day-of-week together are an OR, not an AND.
0 12 1 * 1runs at noon on the 1st and every Monday. - Timezones. Cron uses the system timezone. Always set
TZ=explicitly in your crontab if your servers span regions. - Output is mailed. Long-running jobs that print to stdout can flood
/var/mail/root. Redirect with>/dev/null 2>&1or pipe to a logger.
Modern alternatives
- systemd timers β more flexible, integrate with logs, support OnCalendar expressions.
- Kubernetes CronJob β runs on a cluster, with retries and concurrency policies.
- Cloud schedulers β AWS EventBridge, Google Cloud Scheduler, Azure Logic Apps.
- Application-level schedulers β node-cron, APScheduler, Sidekiq-cron, Quartz.
All of them speak the same five-field cron dialect, so the time you spend learning the syntax pays back forever.
Try it
Paste any expression into the Cron Expression Parser, and it will validate the syntax, describe what it means, and show you exactly when it will fire next. Perfect for code reviews and for sanity-checking that βevery Monday morningβ isnβt actually βevery minute on Mondaysβ.
Found this helpful? Try our free tools!
Explore Our Tools β