⏱ Developer Tool
Cron Expression Generator
Build a crontab schedule field by field, paste an existing expression to see exactly what it does, and preview the next run times in any time zone. Supports Unix 5-field, 6-field with seconds and Quartz syntax — everything runs privately in your browser.
Common schedules
Schedule builder
What it means
Next run times
Ready-to-paste snippets
What is a cron expression?
A cron expression is a short string that tells a scheduler when to run a job. Unix
crontab uses five space-separated fields — minute, hour, day of month, month and day of week.
Schedulers such as Quartz, Spring and node-cron extend the format with a leading seconds column and an
optional trailing year, giving six or seven fields. The generator above writes all three variants and
explains them back to you in plain English so a schedule never has to be guesswork.
| Position | Field | Allowed values | Special characters |
|---|---|---|---|
| 1 (optional) | Seconds | 0-59 | , - * / |
| 2 | Minutes | 0-59 | , - * / |
| 3 | Hours | 0-23 | , - * / |
| 4 | Day of Month | 1-31 | , - * / ? L W |
| 5 | Month | 1-12 or JAN-DEC | , - * / |
| 6 | Day of Week | 0-6 or SUN-SAT (Quartz: 1-7) | , - * / ? L # |
| 7 (optional) | Year | 1970-2099 | , - * / |
Special characters explained
| Character | Meaning | Example | Reads as |
|---|---|---|---|
* | Every value in the field | * * * * * | Every minute |
, | A list of values | 0 8,12,18 * * * | At 08:00, 12:00 and 18:00 |
- | An inclusive range | 0 9-17 * * * | Hourly between 09:00 and 17:59 |
/ | Step values | */10 * * * * | Every 10 minutes |
? | No specific value (Quartz) | 0 0 12 ? * MON | Noon every Monday |
L | Last day / last weekday (Quartz) | 0 0 0 L * ? | Midnight on the last day of the month |
W | Nearest weekday (Quartz) | 0 0 0 15W * ? | The weekday closest to the 15th |
# | Nth weekday of the month (Quartz) | 0 0 9 ? * 6#3 | 09:00 on the third Friday |
@daily | Shorthand for 0 0 * * * | @daily | Once a day at midnight |
Common cron expression examples
| Expression | Schedule | Typical use |
|---|---|---|
* * * * * | Every minute | Health checks and queue pollers |
*/5 * * * * | Every 5 minutes | Cache warming, metric scrapes |
0 * * * * | Top of every hour | Hourly report generation |
0 3 * * * | Daily at 03:00 | Nightly database backups |
30 9 * * 1-5 | Weekdays at 09:30 | Business-hours reminders |
0 0 * * 0 | Sundays at midnight | Weekly log rotation |
0 0 1 * * | First of every month | Invoice and billing runs |
0 0 1 1 * | 1 January each year | Annual archive jobs |
0 22 * * 1-5 | Weeknights at 22:00 | Batch imports after hours |
*/30 9-17 * * 1-5 | Every 30 min during office hours | Sync jobs while staff are online |
Frequently asked questions
What is a cron expression?
A cron expression is a compact string of five to seven space-separated fields that tells a scheduler when to run a job. The classic Unix form is minute, hour, day of month, month and day of week — so 30 9 * * 1-5 means 09:30 every weekday.
What do the special characters in cron mean?
An asterisk means every value, a comma separates a list, a hyphen makes a range, and a slash sets a step — so */15 means every 15 units. Quartz adds ? for no specific value, L for last, W for nearest weekday and # for the nth weekday of the month.
Why does my job run more often when I set both day of month and day of week?
Standard cron treats a restricted day-of-month and a restricted day-of-week as an OR, not an AND. If either field matches, the job runs. To pin a job to one specific weekday, leave day of month as *. Quartz avoids the ambiguity by requiring ? in one of the two fields.
Which time zone does cron use?
Traditional crontab uses the server's local time zone, GitHub Actions always uses UTC, and Kubernetes CronJob supports an explicit timeZone field from version 1.27 onwards. Use the time-zone selector above to confirm the real firing times before you deploy.
Does cron support seconds?
Standard Unix crontab has a one-minute resolution and no seconds field. Quartz, Spring, node-cron and cronR accept a leading seconds column, giving a six or seven field expression. Switch the format selector to build those.
Can I share a schedule with a teammate?
Yes. Use Copy shareable link — the expression, format and time zone are stored in the URL, so opening the link reloads the exact same schedule.
Is my data sent to a server?
No. Validation, the plain-English description and the next-run calculations all run locally in your browser. Nothing is uploaded or stored.