About the Cron Job Generator
What is a cron job?
A cron job is a command your server runs on a schedule without anyone being there. The scheduler is called cron, the file it reads is called a crontab, and the schedule is five numbers separated by spaces. Those five numbers are the whole difficulty. 0 9 * * 1-5 is nine in the morning on weekdays, and there is nothing about the syntax that tells you so.
We rebuilt this generator in 2026 around the part every other tool leaves out, which is showing you when the thing will actually run. The grid near the top plots the next seven real days, hour by hour, and it repaints as you type. That is how you catch the mistakes that read fine on paper: a step that does not divide evenly into the hour, a day of the month that does not exist in February, or the classic one where setting both day fields makes a job run far more often than you meant.
How to Use This Tool
- Pick a starting point from the chips under the expression box, or type an expression straight in. The five boxes underneath show how it was split up.
- Read the sentence below them. If it does not say what you meant, something is wrong with the expression rather than with your memory of the syntax.
- Look at the grid. Seven real days across the next week, one square per hour, shaded by how many times the job fires. The number on the right is the total for that day.
- Adjust with the field cards below. They stay in step with the expression, so typing changes the buttons and clicking the buttons changes the text.
- Set the time zone if your server does not run on UTC. It only changes the preview, since cron itself uses whatever the machine is set to.
- Put in your command, choose what happens to its output, and copy the finished line into
crontab -e.
Common Use Cases
Anything that needs doing on a schedule and nobody wants to remember.
- Database backups. Nightly is the usual answer, and 3am local time is the usual hour, because that is when nobody is using it.
- Clearing out old files. Session files, temporary uploads and log archives all pile up until something removes them.
- Sending queued email. Every five minutes is common, and the grid makes it obvious how many runs that adds up to.
- Pulling in a feed or an API. Hourly during business hours costs a fraction of what hourly around the clock does.
- Generating reports. First of the month at 6am, or every Monday morning before anyone reads their email.
- Renewing certificates. Twice a day is what certbot recommends, at times that are not on the hour, to spread the load.
- CI and scheduled workflows. GitHub Actions, Kubernetes CronJobs and AWS EventBridge all use cron syntax with small differences, and this tool covers all of them.
The five fields
They always come in this order, and every one of them takes the same set of shapes.
What the special characters mean
Cron examples worth copying
Frequently Asked Questions
How do I run a cron job every 5 minutes?
Put */5 in the minute field, so the whole expression is */5 * * * *. The slash is a step, and it fires at minutes 0, 5, 10 and so on up to 55. Watch out for a step that does not divide into 60: */7 runs at minute 56 and then again at minute 0, which is a gap of four minutes rather than seven. This tool warns you when that happens.
What does 0 9 * * 1-5 mean?
Nine in the morning, Monday to Friday. Reading it field by field: minute 0, hour 9, any day of the month, any month, and days of the week 1 through 5. The days run from 0 for Sunday to 6 for Saturday, so 1 through 5 is Monday through Friday. Paste it into the box above and the sentence underneath says the same thing.
What is the difference between 5 and */5 in the minute field?
A world of difference. 5 means minute 5, once an hour, so 24 runs a day. */5 means every fifth minute, which is 288 runs a day. This is the single most common cron mistake and it is a factor of twelve. The grid on this page makes it obvious, because one version shades a thin line of squares and the other shades all of them.
Is Sunday 0 or 7 in cron?
Both, in standard cron. The day of the week field accepts 0 through 7 and treats 0 and 7 as the same day, which exists so that people who count weeks from Monday and people who count from Sunday can both write what they expect. Quartz and AWS EventBridge are different: there Sunday is 1 and Saturday is 7, so every day number shifts by one. Pick the right format at the top of this page and the preview accounts for it.
Why does my cron job run more often than I expect?
Almost always because both day fields are set. When the day of the month and the day of the week are both restricted, cron runs the job if either matches, not both. So 0 0 1 * 1 is not "the 1st, if it is a Monday", it is "the 1st of the month, and also every Monday". If you need the AND behavior, leave one field as * and test the other one inside your script.
What time zone does cron use?
Whatever the machine is set to, which on a server is very often UTC even when you are not. Check with timedatectl or date. Modern cron on Linux lets you set CRON_TZ=Europe/London at the top of the crontab to override it for the lines that follow. GitHub Actions is always UTC with no override, and a Kubernetes CronJob is UTC unless the spec sets .spec.timeZone. The time zone dropdown on this page changes the preview only.
Why does my cron job not run at all?
Four causes cover nearly every case. The command works in your shell but not in cron because cron has almost no PATH, so use the full path to the program. The script is not executable, so run chmod +x on it. The crontab has no trailing newline, which some versions of cron silently refuse. Or the job is failing and the error is going into a mail spool nobody reads, which you can fix by appending >>/var/log/mycron.log 2>&1 and looking at the file.
How do I stop cron from emailing me every time?
Add >/dev/null 2>&1 to the end of the command, which throws away both normal output and errors. That is a blunt instrument, because it also hides genuine failures. A better option is >/dev/null on its own, which discards the normal output and still mails you anything on the error stream. Pick either one from the output dropdown above and the line updates.
Can I schedule something every 30 seconds?
Not with standard cron, which has no seconds field and cannot run more often than once a minute. The usual workaround is two entries, one plain and one with a sleep 30 in front of the command. Better options are a systemd timer with OnUnitActiveSec=30s, or a job runner that takes six field expressions, which you can build here by switching the format to the six field one.
Is anything I type sent to your server?
No. The parsing, the schedule preview and the crontab line are all worked out in JavaScript in your browser, so the command and paths you enter stay on your machine. If you already have an expression and only want to know what it does, our crontab explainer is built for reading rather than building.