Home βΊ Cron Expression Explainer & Next Run Calculator
Cron Expression Explainer & Next Run Calculator
Next 5 run times
Cron syntax in one minute
A standard cron expression has five fields separated by spaces. The job runs whenever all fields match the current time (with one exception for the two day fields, explained below).
ββββββββββββββ minute (0β59) β ββββββββββββ hour (0β23) β β ββββββββββ day of month (1β31) β β β ββββββββ month (1β12 or JANβDEC) β β β β ββββββ day of week (0β7 or SUNβSAT, 0 and 7 are Sunday) β β β β β * * * * *
| Symbol | Meaning | Example |
|---|---|---|
* | every value | * * * * * = every minute |
, | list | 0 8,12,18 * * * = 08:00, 12:00 and 18:00 |
- | range (inclusive) | 0 9-17 * * * = on the hour, 9 AM to 5 PM |
/ | step | */10 * * * * = every 10 minutes; 0 9-17/2 * * * = 9, 11, 13, 15, 17 h |
Common cron schedules
| Schedule | Expression |
|---|---|
| Every 5 minutes | */5 * * * * |
| Every hour (on the hour) | 0 * * * * |
| Every day at midnight | 0 0 * * * (same as @daily) |
| Weekdays at 09:30 | 30 9 * * 1-5 |
| Every Sunday at 03:00 | 0 3 * * 0 |
| First day of every month at 06:00 | 0 6 1 * * |
| Every quarter (Jan, Apr, Jul, Oct 1st) | 0 0 1 */3 * |
Gotchas that bite in production
- Time zones. Cron uses the scheduler's time zone. Most servers, containers, GitHub Actions and Kubernetes (unless
timeZoneis set) run in UTC, so0 9 * * *may fire at 4 AM or 10 AM local time. Tick the UTC box above to see what UTC execution looks like. - Daylight saving time. On the night clocks jump forward, jobs scheduled inside the skipped hour may not run; when clocks go back, they may run twice. Avoid scheduling critical jobs between 01:00 and 03:00 local time.
- Day-of-month OR day-of-week. If both fields are restricted (neither starts with
*), cron runs when either one matches. - Steps restart each hour/day.
*/7in the minute field fires at :00, :07 β¦ :56 and then again at :00 β the gap between :56 and :00 is only 4 minutes. Cron cannot express "every 7 minutes" continuously. - Percent signs. In a crontab line, an unescaped
%in the command is turned into a newline. Writedate +\%F.
This tool implements standard Vixie/ISC cron semantics, including the @hourly, @daily, @weekly, @monthly and @yearly shortcuts. Next run times are computed in your browser.
Frequently asked questions
What is the cron expression for every 5 minutes?
*/5 * * * * runs at minute 0, 5, 10 β¦ 55 of every hour. The */5 in the minute field means 'every value from 0 to 59 that is divisible by 5'. For every 15 minutes use */15 * * * *, and for every 30 minutes use */30 * * * * (or 0,30 * * * *).
How do I run a cron job every weekday at 9 AM?
Use 0 9 * * 1-5. The fields are minute (0), hour (9), day of month (*), month (*) and day of week (1-5 = Monday to Friday). The job runs in the time zone of the machine or scheduler that executes it, which is often UTC on servers.
Why does my cron run more often than expected when I set both day of month and day of week?
In standard (Vixie) cron, when both the day-of-month and day-of-week fields are restricted, the job runs when EITHER matches. 0 0 13 * 5 runs on every 13th AND on every Friday, not only on Friday the 13th.
Does this support seconds or the Quartz cron format?
No. This tool explains the classic 5-field Unix cron format used by crontab, Kubernetes CronJobs, GitHub Actions and most cloud schedulers. Quartz and Spring use 6 or 7 fields with seconds first, and syntax such as L, W and # that standard cron does not have.