One Misplaced Star Can Turn a Nightly Job Into a Minute by Minute Outage
Putting * 2 * * * in a crontab instead of 0 2 * * * is a classic rite of passage in operations. Rather than running once at 2:00 AM, that single asterisk in the first field triggers your backup or billing script sixty times between 2:00 and 2:59 AM. Previewing your exact upcoming timestamps before saving a schedule catches mistakes like that before they hit production.
This generator builds 6 field expressions (Seconds, Minute, Hour, Day of Month, Month, Day of Week), translates them into plain English, and computes the next 10 execution timestamps in any selected IANA timezone. Everything evaluates locally in your browser, and you can export the schedule summary plus upcoming run dates as a plain text file. If your server uses standard 5 field Linux crontab or Kubernetes CronJob syntax, keep the leading Seconds field set to 0 while testing here, then copy only the last five fields when pasting into your cluster or server.
Reading the Six Fields and Operators
Each input box above controls one time unit from left to right. Leaving a box empty defaults it to *, and clicking any segment in the large blue expression bar jumps straight to its corresponding input:
| Position | Field | Allowed Values | Example |
|---|---|---|---|
| 1 | Seconds | 0 to 59 (omit for 5 field Unix cron) |
0 (top of the minute) |
| 2 | Minutes | 0 to 59 |
*/15 (every 15 minutes) |
| 3 | Hours | 0 to 23 (24 hour clock) |
9-17 (9 AM through 5 PM) |
| 4 | Day of Month | 1 to 31 |
1,15 (1st and 15th) |
| 5 | Month | 1 to 12 (or JAN to DEC) |
* (every month) |
| 6 | Day of Week | 0 to 6 or 7 (Sunday is 0 or 7; or MON to SUN) |
1-5 (Monday through Friday) |
Four operators handle nearly every recurring schedule. An asterisk (*) matches every legal value in that column. Commas (,) list discrete picks such as 0,30 for the top and bottom of an hour. Hyphens (-) define inclusive spans like 9-17 (which runs through 17:59 if Minute is *, or 17:00 if Minute is 0). Slashes (/) step across intervals: */10 fires every ten units starting at zero, while 10-40/5 fires at 10, 15, 20, 25, 30, 35, and 40.
Put those together for a weekday office hours health check every 15 minutes: 0 */15 9-17 * * 1-5. In the preview panel above, that translates to running every 15 minutes from 09:00 through 17:45 on Monday through Friday, with ten exact timestamps listed in your chosen timezone. Strip the leading 0 to get */15 9-17 * * 1-5 for standard 5 field crontabs.
5 Field vs 6 Field vs Cloud Schedulers
Cron looks universal until you move a working expression from one platform to another. Different schedulers disagree sharply on how many fields exist and what sits in the sixth column:
- Linux crontab, macOS launchd wrappers, and Kubernetes CronJobs: Use 5 fields starting at Minute. Adding a sixth field here causes a syntax rejection or tries to run the sixth token as a shell command.
- Spring
@Scheduled, Quartz, and Node cron libraries like Croner: Use 6 fields with Seconds first, matching this builder's layout directly (note that Quartz also expects?in either Day of Month or Day of Week rather than allowing*in both). - AWS EventBridge (CloudWatch Events): Also uses 6 fields, except AWS omits Seconds and places Year in the sixth column instead, while requiring
?in one of the two day fields. - systemd timers: Do not use cron strings at all; they use human readable
OnCalendar=Mon..Fri 09..17:00/15directives inside unit files.
Four Crontab Mistakes That Break Production Jobs
Even syntactically valid expressions hide operational traps once deployed to a real machine.
1. The Day of Month vs Day of Week OR Trap
In traditional Vixie Cron on Linux, filling in both Day of Month and Day of Week evaluates as logical OR rather than AND. Writing 0 0 13 * 5 intending "midnight only on Friday the 13th" actually runs on every 13th of the month plus every Friday. Keep Day of Week as * and let the shell verify the weekday: 0 0 13 * * [ "$(date +\%u)" -eq 5 ] && /usr/local/bin/audit.sh (escaping % with a backslash because crontab treats unescaped percent signs as newlines).
2. Daylight Saving Time Jumps
A job scheduled at 2:30 AM local time disappears completely on the spring forward Sunday when clocks jump from 1:59 AM to 3:00 AM, and fires twice on the fall back Sunday. Switching the Timezone selector above to UTC lets you verify predictable intervals, and keeping production servers on UTC avoids clock shift surprises altogether.
3. Minimal PATH and Missing Environment Variables
Scripts that pass in your interactive terminal routinely fail inside cron because the daemon starts with a barebones environment (often just PATH=/usr/bin:/bin) without Node, Python virtualenvs, or Docker paths. Reference binaries by absolute path such as /usr/bin/python3 and source required environment files explicitly inside a wrapper script.
4. Overlapping Slow Jobs
If a database export scheduled every 10 minutes starts taking 14 minutes during peak traffic, cron happily launches a second copy on top of the first until disk I/O stalls. Wrapping commands with flock prevents pileups by skipping new runs whenever a lock file is held.
Crontab Scheduling FAQs
What is the difference between 5-field and 6-field cron expressions?
Standard Unix crontab and Kubernetes CronJobs use 5 fields starting with Minute. Extended schedulers like Quartz, Spring, and this tool's 6 field format place Seconds (0 to 59) first, whereas AWS EventBridge uses 6 fields with a trailing Year field instead, and systemd timers use OnCalendar syntax.
Does this tool support step increments using the slash (/) operator?
Yes. Enter expressions like */10 in the Minute box to run every 10 minutes, or 10-40/5 to step every 5 units within a range.
How do I avoid overlapping executions if my job takes longer than the interval?
Wrap the shell command with Linux flock, for example flock -n /var/lock/myjob.lock /usr/local/bin/myjob.sh, so cron exits immediately if the previous run has not finished.
Can I use non-standard shorthand macros like @daily or @weekly?
Many Unix crontab implementations accept macros such as @reboot, @daily (0 0 * * *), @hourly (0 * * * *), and @weekly (0 0 * * 0). In this 6 field builder, enter the numeric equivalent instead (such as 0 0 0 * * * for daily midnight) or choose one from the Presets menu.
Is my schedule data stored or sent anywhere?
No. Syntax validation, plain English descriptions, and the 10 upcoming schedule timestamps run completely inside your browser tab.