Cron Expression Generator
Build a crontab schedule from dropdowns — minute, hour, day, month, weekday — with a plain-English readout and common presets.
998 views
How It Works
A cron expression schedules a recurring job using five space-separated fields, always in the same order: minute · hour · day-of-month · month · day-of-week. Each field accepts a value or one of four special characters: * means "every possible value"; */15 means "every 15 units, starting from the field minimum"; 1,15,30 is an explicit list; 1-5 is an inclusive range. Reading left to right, 0 9 * * 1-5 means "at minute 0 of hour 9, every day-of-month, every month, on weekdays 1 through 5" — that is, 9:00 AM Monday through Friday. */10 * * * * fires every 10 minutes around the clock, and 0 0 1 * * fires at midnight on the 1st of every month.
Build a schedule from the dropdowns and this tool assembles the five fields, then translates the result into a plain-language sentence so it can be sanity-checked before pasting it into a crontab file or a cloud scheduler. Common presets — every minute, hourly, daily at a given time, weekdays only — are one click away for the schedules people reach for most often.
What You Should Know
The single biggest surprise in cron semantics: when both day-of-month and day-of-week are restricted (neither is left as *), the two are combined with OR, not AND. So 0 0 15 * 5 does not mean "the 15th, if it is a Friday" — it means "the 15th of the month, OR every Friday," which fires far more often than most people intend. If only one of the two matters, leave the other as *.
Day-of-week numbering can also surprise: both 0 and 7 mean Sunday in most cron implementations, with Monday as 1. And crucially, cron always runs in the server configured timezone — commonly UTC on cloud infrastructure — not the local timezone of whoever set the schedule up, so a job scheduled for "9 AM" may fire at a different local hour than expected until the host timezone is confirmed. Cloud schedulers like GitHub Actions' schedule:, AWS EventBridge, and Kubernetes CronJob all use this same five-field syntax as their foundation, sometimes with vendor-specific extensions (an optional seconds field, a named-day shorthand), so a schedule built here transfers directly to those platforms with minimal translation.
Frequently Asked Questions
How do I run something every 30 seconds?
Classic cron's smallest unit is a minute. The common workaround is two entries: one plain, one with `sleep 30 &&` before the command — or use systemd timers, which support seconds.
Why did my 9:00 job run at a strange hour?
Almost always timezone: crontab runs in the server's local time (often UTC on cloud boxes). Check with `date` on the host, or set CRON_TZ where supported.
How do I test an expression safely?
Point it at a logging command first: `* * * * * date >> /tmp/cron-test.log`, confirm the cadence, then swap in the real command. Also confirm the crontab user has the needed PATH — cron's environment is minimal.
What happens when day-of-month and day-of-week are both set?
They combine with OR, not AND — a schedule like `0 0 15 * 5` runs on the 15th of the month AND on every Friday, not only on a Friday that happens to fall on the 15th. Cron alone cannot express an intersection of both conditions; that check has to happen inside the job itself.
Does cron account for daylight saving time?
It depends on the implementation, but classic cron generally follows the system clock's local time including DST shifts — which means a job scheduled during the "spring forward" or "fall back" hour can run zero or two times that day. Servers set to UTC avoid this entirely, which is one more reason most production schedulers default to it.
Can I combine a range and a step in the same field, like every other weekday?
Yes — a step can be applied to a range instead of only to a wildcard: `1-5/2` in the day-of-week field means "every second day within Monday-Friday," i.e. Monday, Wednesday, Friday. This combined range/step form is supported by most modern cron implementations (including Vixie cron and systemd), though not by the oldest POSIX ones, so test it once before relying on it in a legacy environment.
Similar Tools
Report a Problem
Cron Expression Generator
Comments
No comments yet — be the first to write one!