Cron Expression Generator - Free Online Tool
A cron expression in three steps
From a schedule in your head to a line you can paste into crontab, with the next run times to prove it.
- STEP 01
Pick a preset
Start from every 5 minutes, hourly, daily at midnight, weekdays at 9 AM and more.
12 presets to start from - STEP 02
Adjust the fields
Change the minute, hour, day of month, month or day of week from the dropdowns.
The description updates live - STEP 03
Check and copy
Read the next 5 run times, then copy the expression into your scheduler.
Times show in your time zone
How to use this cron generator
Think about when the job should run, not about the syntax. The builder writes the five fields for you.
- 1
Start with how often
Every few minutes, every hour, once a day or once a week? Pick the preset closest to that.
- 2
Then set the time
Choose the minute and hour. A fixed hour and minute reads as a clock time, like “At 9:00 AM”.
- 3
Limit the days
Use day of week for weekdays or one weekday, day of month for a date like the 1st, and month for one month a year.
- 4
Read the run times
The next 5 runs are the real check. If they're not what you expected, change a field before you copy.
What makes a cron schedule safe to ship
Four habits that stop a scheduled job from running at the wrong time, or not at all.
Know the clock it uses
Cron runs in the time zone of the machine or service, not yours. Many cloud servers and services use UTC.
- Check with date on the server
- GitHub Actions uses UTC
- Convert before you copy
Check the next runs
Five real dates catch most mistakes, like a day of month that never comes or the wrong hour.
- Read all five
- Watch month ends
- Look for 31 February
Not more often than needed
Every minute is 1,440 runs a day. Pick the slowest schedule the job can live with.
- Every 5 min = 288 a day
- Hourly = 24 a day
- Daily = 1 a day
Don't stack on the hour
Lots of jobs run at minute 0. Moving yours a few minutes off spreads the load.
- Try minute 7 or 23
- Stagger related jobs
- Keep a schedule list
The five fields of a cron expression
Every standard cron line has the same five time fields, in this order, separated by spaces.
| Field | Allowed values | Example |
|---|---|---|
| Minute | 0 to 59 | */15 = every 15 minutes |
| Hour | 0 to 23 | 9 = the 9 AM hour |
| Day of month | 1 to 31 | 1 = the 1st |
| Month | 1 to 12 | 1 = January |
| Day of week | 0 to 6 (0 = Sunday) | 1-5 = Monday to Friday |
* any value
* in the hour field means every hour.
*/n every n
*/15 in the minute field means 0, 15, 30 and 45.
a-b a range
1-5 in day of week means Monday to Friday.
a,b a list
0,6 in day of week means Saturday and Sunday.
The crontab manual also allows 7 for Sunday and three-letter names like mon or jan. This builder writes numbers, which every scheduler in the comparison below accepts.
Where cron schedules turn up
The same five fields drive jobs in very different places. Each has its own catch.
Linux servers
A line in crontab runs a command on the server's clock. The command field has its own rules too.
GitHub Actions
The schedule trigger takes the same five fields, but always reads them in UTC and can run late under load.
Kubernetes CronJobs
The schedule field takes five fields. Set .spec.timeZone, or it uses the controller's local time zone.
Cloud schedulers
Google Cloud Scheduler takes the same five fields. AWS EventBridge uses six, with a year and a ? field.
Three rules that decide when a job fires
These come from the crontab manual. Most “why did it run then?” surprises trace back to one of them.
Every field must match
A job runs in a minute when the minute, hour and month all match, and the day matches.
- 0 9 * * * = 9:00 every day
- */10 9 * * * = 9:00 to 9:50
- 0 */6 * * * = 00, 06, 12, 18:00
Two day fields: either one
If both day of month and day of week are set, the job runs when either matches, not both.
- 0 0 1 * 1 = the 1st and every Monday
- Not only Mondays that are the 1st
- The description above says “or”
Common mistakes
These are the ones that make a job run too often, or never.
- * in the minute when you meant 0
- A date that doesn't exist, like 31 February
- Assuming your time zone on a UTC server
- An unescaped % in the crontab command
Keeping scheduled jobs healthy
An expression is the start. These habits keep jobs running on time for years.
- 1
Comment every line
Put a comment above each crontab entry saying what it does and who owns it. The expression alone won't tell the next person.
- 2
Log the output
Send the job's output to a log file. A silent job that fails looks the same as one that works.
- 3
Write the time zone down
Note the server's time zone next to the schedule, and check it again after moving the job to a new server or service.
- 4
Review once a quarter
Delete schedules for jobs that no longer exist, and re-check the next run times of the ones that stay.
Where a 5-field cron expression works as-is
The five fields are widely shared, but the details differ. Check this before you paste.
| Scheduler | Takes these 5 fields | Default time zone | Watch for |
|---|---|---|---|
| Linux crontab | ✓ Yes | The server's | CRON_TZ, % in the command |
| GitHub Actions | ✓ Yes | UTC only | Every 5 minutes at most |
| Kubernetes CronJob | ✓ Yes | The controller's | ✓ Set .spec.timeZone |
| Google Cloud Scheduler | ✓ Yes | UTC unless set | ✓ Set the time zone |
| AWS EventBridge | ✗ Needs 6 fields | UTC unless set | ✗ Add a year and a ? |
AWS EventBridge numbers the days of the week 1 to 7 (Sunday is 1), unlike crontab's 0 to 6, so convert the day of week too. Working with Unix times as well? Try the Unix Timestamp Converter.
Pro tips for cron jobs that behave
Small habits that save a late-night debugging session.
Avoid minute 0
Many jobs fire at the top of the hour. A few minutes off spreads the load.
Convert to UTC
On a UTC server, 9 AM in India (UTC+5:30) is 3:30 in the morning UTC.
Escape % in crontab
In a crontab command, % becomes a newline unless you write \%. Dates in file names trip on this.
Redirect the output
Send output to a log with >> file 2>&1 so failures leave a trace.
Month ends vary
Day 31 skips every month with 30 days or fewer. Day 29 to 31 skip February in most years.
One job, one schedule
If a job can still be running when the next run starts, add a lock so two copies don't overlap.
Back up off-peak
Heavy jobs like backups belong in the quietest hour of your traffic, in the server's clock.
Keep a schedule list
One page listing every job, its expression and its owner makes changes safe.
Before you set the real schedule, point the job at a time two or three minutes away and watch it run. Then change only the time fields. If it never runs, the problem is the command or the environment, not the expression.
UTC or local time? Which clock to schedule in
The same expression fires at different moments on different clocks. Choose one on purpose.
Schedule in UTC
UTC has no daylight saving changes, so a job never meets a skipped or repeated hour. GitHub Actions only works in UTC, and Google Cloud Scheduler defaults to it and suggests it.
Best for backups, syncs and anything machine-facing
Schedule in a named zone
A report that must land at 9 AM in Mumbai is easier in Asia/Kolkata. Kubernetes (.spec.timeZone), Google Cloud and AWS let you name the zone.
Best for emails and reports people read
Who uses this cron generator
The same five fields, six very different jobs.
Backend developers
Schedules for cache clears, queue sweeps and report jobs without looking up the field order.
DevOps and SREs
Checking an existing crontab line does what the ticket says before it reaches production.
CI maintainers
Nightly builds and weekly dependency checks for a GitHub Actions schedule, in UTC.
Data engineers
Hourly and daily pipeline runs, staggered so they don't all start on the hour.
Students
Learning the five fields by changing one dropdown and watching the description change.
Self-hosters
Backups, updates and certificate checks on a home server or a small VPS.
Testing a pattern for a log line? Try the Regex Tester.
Frequently asked questions
Quick answers about cron syntax, presets and where the expression works.
What is a cron expression?
What does * mean in a cron expression?
What does */5 mean?
How do I schedule a cron job for every Monday?
Is this cron generator free?
Does it support 6-field cron (with seconds)?
Can I use this for GitHub Actions or AWS?
What people say
Reviews from people who used this tool.
Loading reviews…
Popular presets
Jump to a version of this tool already set up for a specific need.
More free developer tools
Free, with no sign-up, just like this one.
- Free toolFavicon GeneratorTurn any image into the full favicon set - six standard sizes plus the HTML meta tags ready to paste, generated locally in your browser.Try it now
- Free toolHash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-512 hashes from text or filesTry it now
- Free toolCSS Gradient GeneratorCreate beautiful CSS gradients visually - linear, radial, conic with live preview and code outputTry it now
- Free toolBase64 Encoder / DecoderEncode text to Base64 or decode Base64 strings instantly in your browserTry it now
- Free toolJWT DecoderDecode and inspect JSON Web Tokens - view header, payload, expiry, and claims instantlyTry it now
- Free toolUnix Timestamp ConverterConvert Unix timestamps to human dates and vice versa with live clockTry it now