Cron Expression Explainer
Turn a five-field cron expression into a sentence, see what each field matches, and get the next runs in UTC. Macros like @daily work, and the day-of-month/weekday OR rule is spelled out.
Same thing, as an API
curl 'https://akifakkaya.com/api/v1/tools/cron?expr=*%2F15+9-17+*+*+MON-FRI&count=6'
Free, no key, 120 requests a minute. Full endpoint reference
About this tool
Five fields, five ranges, and two of them overlap in a way almost nobody remembers: when both the day-of-month and the day-of-week field are restricted, cron fires if either matches, not both. 0 0 13 * FRI is not "Friday the 13th" — it is every 13th and every Friday. The description here says "or" out loud for exactly that case.
The next runs are the real check. A description can be misread; a list of timestamps cannot, and it catches the schedules that are technically right and practically wrong — 0 0 29 2 * describes itself fine and then fires once every four years. All times are UTC, which is also what your server's crontab is probably using whether you meant it to or not.
Standard five-field cron only. The Quartz extensions — L for the last day, W for the nearest weekday, # for the nth weekday — are rejected with a note saying so, rather than silently parsed as something else. A six-field expression gets the same treatment: the leading seconds column is a Quartz and Spring convention, not a crontab one.
Questions
- Why does my day-of-month and weekday schedule fire more often than I expected?
- Because cron treats the two fields as OR when both are restricted. `0 0 1 * MON` runs on the 1st of every month and on every Monday. To get the intersection you need a guard in the job itself, or a scheduler that supports it.
- Which timezone are the next runs in?
- UTC. A crontab runs in the system timezone of the machine it lives on, so compare the list with that machine's clock — the mismatch between the two is a common cause of a job that fires an hour off twice a year.
- Does it support @daily, @hourly and friends?
- Yes: @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly are expanded to their five-field equivalents. @reboot has no schedule to show, so it is refused with an explanation.
- What about seconds?
- A five-field expression has no seconds column. If yours has six fields it is Quartz or Spring syntax; drop the leading seconds field to see the rest explained.