Developer
Encoders, converters & dev utilities
Unix Cron Expression Generator (5-Field crontab)
Build and explain classic 5-field Unix cron expressions for crontab, CI/CD, and Kubernetes CronJobs. The five fields are minute, hour, day-of-month, month, and day-of-week, using *, ranges (1-5), lists (1,3,5), and steps (*/15). Worked example: 0 9 * * 1-5 means "at 09:00, Monday through Friday", and */15 * * * * means "every 15 minutes". One important gotcha: when BOTH day-of-month and day-of-week are restricted, Vixie/POSIX cron treats them as a union (OR), not an intersection — so 0 0 1 * MON runs on the 1st of the month OR any Monday, not "the 1st only if it is a Monday". The tool honours that union and previews the next run times. Free, no login, 100% client-side.
Unix cron = 5 fields: minute hour day-of-month month day-of-week (operators: * , - / ; 0 and 7 both = Sunday)
- Worked example: 0 9 * * 1-5 = "at 09:00, Monday through Friday"; */15 * * * * = "every 15 minutes"
- DOM/DOW OR-union gotcha: when BOTH day-of-month and day-of-week are set, cron runs if EITHER matches (union, not intersection)
- So 0 0 1 * MON fires on the 1st of the month OR any Monday — not only 1sts that fall on a Monday
- Next-run preview runs in a timezone you pick (classic Unix cron uses the server's local time); 100% client-side
Frequently asked questions
What are the five fields of a Unix cron expression?
In order they are minute (0–59), hour (0–23), day-of-month (1–31), month (1–12), and day-of-week (0–7, where both 0 and 7 mean Sunday). Each field accepts * (any), ranges like 1-5, lists like 1,3,5, and steps like */15. So 0 9 * * 1-5 is 09:00 on weekdays, and */15 * * * * is every 15 minutes.
Why does 0 0 1 * MON run more often than I expect?
Because of the day-of-month / day-of-week OR rule. In Vixie/POSIX cron, when both the day-of-month and day-of-week fields are restricted (neither is *), the job runs whenever EITHER field matches — it is a union, not an intersection. So 0 0 1 * MON fires at midnight on the 1st of every month AND on every Monday, not just on 1sts that happen to be Mondays. This is exactly why Quartz and AWS require a ? in one of those fields to remove the ambiguity.
Does 0 or 7 mean Sunday in Unix cron?
Both do. In the standard Unix day-of-week field, Sunday can be written as 0 or 7, with Monday through Saturday being 1 through 6. Many implementations also accept three-letter names (SUN, MON, …). Note this differs from Quartz, where 1 = Sunday and 7 = Saturday — so never copy a day-of-week number between the two dialects without adjusting it.