Cron Expression Generator
A cron expression is a string of five fields that tells a scheduler when to run a task, in the order minute, hour, day of month, month, and day of week. The generator below turns a plain-English schedule into the exact cron string you paste into a crontab, with a description of when it will run and a legend for every field.
0 0 * * * runs at midnight every day, and */5 * * * * runs every five minutes.What a Cron Expression Is
Cron is the time-based job scheduler on Unix and Linux systems. It reads a table of jobs, called a crontab, and runs each command when the clock matches that job’s schedule. The schedule is written as a cron expression: five fields separated by spaces, each describing one unit of time. When the current minute, hour, day, month, and weekday all match the expression, cron runs the command. This is how servers run backups overnight, rotate logs, send reports, and clear caches without anyone starting them by hand.
How to Use This Generator
- Pick a schedule from the dropdown, such as every hour or every day at a time.
- For timed schedules, set the hour and minute the job should run.
- For the weekly schedule, choose the weekday as well.
- Read the description to confirm the timing is what you meant.
- Copy the cron expression and paste it into your crontab in front of the command you want to run.
The Five Cron Fields
| Field | Position | Allowed range |
|---|---|---|
| Minute | 1st | 0-59 |
| Hour | 2nd | 0-23 |
| Day of month | 3rd | 1-31 |
| Month | 4th | 1-12 (or JAN-DEC) |
| Day of week | 5th | 0-6 (0 is Sunday, or SUN-SAT) |
* means every value in the field. A comma , lists several values, as in 0,30 for minutes 0 and 30. A hyphen - sets a range, as in 1-5 for Monday through Friday. A slash / sets a step, as in */15 for every fifteenth value. Combine them to build any schedule.Common Cron Examples
A few patterns cover most jobs. * * * * * runs every minute. 0 * * * * runs at the top of every hour. 0 0 * * * runs at midnight each day. 30 2 * * 0 runs at 2:30 AM every Sunday. 0 0 1 * * runs at midnight on the first day of each month. */10 * * * * runs every ten minutes. Once you can read the field order, each of these reads left to right as minute, hour, day, month, weekday.
Where Cron Runs
On a Linux server you add cron jobs with the crontab -e command, which opens your personal crontab in an editor. Each line is a cron expression followed by the command to run, so 0 3 * * * /usr/bin/backup.sh runs a backup script at 3 AM daily. Step values written with a slash, like */5, are the shorthand for repeating intervals and are the most common way to schedule jobs that run several times an hour. Many other tools borrow the same syntax, including cron services in cloud platforms, task runners, and CI pipelines, so the expression you build here works far beyond a single server.
When to Use It
Use a cron expression whenever a task should run on a fixed clock rather than on demand. That covers nightly database backups, hourly cache clearing, weekly report emails, and monthly cleanup of old files. Writing the schedule by hand is easy to get wrong, since a single misplaced field can run a job sixty times more often than you intended, so generating it from a plain-English preset removes the guesswork before you commit it to a live crontab.
Last Thoughts on Cron Expressions
The hard part of cron was never the scheduling itself. It was remembering that the fields run minute, hour, day of month, month, day of week, and that an asterisk means every value while a slash sets a step. Once the order is clear, every expression becomes readable, and a generator keeps you from shipping a schedule that fires far more often than planned.
Build the expression for your next scheduled job above, then confirm the description matches your intent before you save it. For related work, convert epoch times with our Unix timestamp converter, tidy config output with the JSON formatter, and test command patterns with the regex tester, alongside the rest of our free online tools.
Key Takeaways:
- A cron expression has five fields in order: minute, hour, day of month, month, and day of week.
- An asterisk means every value, a comma lists values, a hyphen sets a range, and a slash sets a step.
- The day-of-week field runs 0 to 6, where 0 is Sunday.
0 0 * * *runs daily at midnight;*/5 * * * *runs every five minutes.- Add jobs on Linux with
crontab -e, putting the expression before the command. - Generate from a plain-English preset to avoid a schedule that fires more often than you meant.
Frequently Asked Questions (FAQs)
What are the five fields in a cron expression?
In order, they are minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday). Cron runs the command when the current time matches all five fields at once.
What does the asterisk mean in cron?
An asterisk means every value for that field. So an asterisk in the minute field means every minute, and a cron line of all asterisks runs once every minute.
How do I run a job every five minutes?
Use a step value in the minute field with a slash: */5 * * * *. The slash means run every fifth value, so the job fires at minute 0, 5, 10, and so on through the hour.
What does 0 0 * * * mean?
It runs the job at minute 0 of hour 0, every day of every month, on every weekday. In plain English that is once a day at midnight.
How do I add a cron job on Linux?
Run crontab -e to open your crontab in an editor, then add a line with the cron expression followed by the command, such as 0 3 * * * /usr/bin/backup.sh. Save and close the editor and cron picks up the new schedule.
Is Sunday 0 or 7 in cron?
Sunday is 0 in the standard day-of-week field, which runs 0 to 6. Many cron implementations also accept 7 as Sunday for convenience, but 0 is the portable choice that works everywhere.


