Cron Expression Generator

Cron expression—
Runs when—
Fields—

How Cron Expression Generator is calculated: Five fields — minute, hour, day of month, month, day of week — each a value or * for every. A * means the schedule does not restrict that field. Standard 5-field cron; seconds and years are not part of it.

What is a cron expression generator?

A cron expression is a short string that tells a computer when to run a job: five fields, separated by spaces, that say which minute, which hour, which day of the month, which month, and which day of the week. The expression 0 9 * * * means at 09:00 every day. The expression 30 14 * * 5 means at 14:30 on Fridays. Cron has run the world's scheduled jobs for decades, and the expression is the language it speaks.

This tool builds that string for you. Pick a preset — every minute, hourly, daily, weekly, or monthly — or set the five fields yourself, and the tool shows the expression together with a plain-English description of when it runs. The default is the daily preset: 0 9 * * *, which runs at 09:00 every day.

Each field is a value or a star. A star means the schedule does not restrict that field: a star in the minute field means every minute, a star in the day field means every day. A number means only that value: 9 in the hour field means 09:00, and 5 in the day-of-week field means Friday. The whole schedule is the combination of the five fields, and the description tells you what that combination means in words.

Cron expressions are used for backups, reports, clean-up jobs, reminders, and anything else that should happen on a timetable rather than when someone remembers. A server runs a cron job at the scheduled time without anyone being present, which is the point: the schedule is written once, and the work happens on its own from then on.

How this cron expression generator works

The tool takes the five fields — minute, hour, day of month, month, and day of week — and joins them with spaces, in that order. That order is fixed and it matters: 0 9 * * * is daily at nine, while 9 0 * * * is something else entirely, at 00:09. The results show the expression first, so you can copy it exactly as built, and the description underneath so you can check it means what you intended.

Presets are shortcuts for the common schedules. Every minute is * * * * *, five stars, because nothing is restricted. Hourly is 0 * * * *, at minute zero of every hour. Daily is 0 9 * * *, at 09:00 every day. Weekly is 0 9 * * 1, at 09:00 on Mondays. Monthly is 0 9 1 * *, at 09:00 on the first day of every month. Pick one and the fields are filled in for you.

The custom option uses the fields as you set them. The minute dropdown offers every five minutes plus the star; the hour dropdown offers 0 to 23; the day of month offers 1 to 31; the month offers 1 to 12; and the day of week offers Sunday to Saturday, numbered 0 to 6 with Sunday as 0. Set the fields, click the button, and the expression is built from them.

The description is built from the same five fields, in words. If all five are stars, it says Every minute. If only the hour and minute are set, it says at 09:00 every day. If a day of the week is set, it names the day: at 14:30 on Fridays. Read the description before you save the expression — if the words are wrong, the schedule is wrong, and the words are easier to check than the numbers.

The five fields, explained

The minute field is the first, and it takes 0 to 59. A value of 0 means the top of the hour; a value of 30 means half past. The dropdown offers every five minutes, which covers the schedules most people need — 0, 15, 30, and 45 are the common choices — and a star for every minute. A job that runs every minute is the most frequent schedule cron supports in this five-field form.

The hour field is the second, and it takes 0 to 23, on the 24-hour clock. Hour 9 is 09:00 in the morning, and hour 14 is 14:30 when the minute is 30 — never 2:30 pm in the expression itself, because cron uses 24-hour time. A star here means every hour, so 0 * * * * runs at the top of every hour, all day and all night.

The day of month is the third field, 1 to 31, and the month is the fourth, 1 to 12. A 1 in the day field with a star in the month means the first of every month. A 1 in the month field with a star in the day field means every day in January. Set both and the job runs on one day a year — the 1st of January, for example, is 0 9 1 1 *.

The day of week is the fifth field, 0 to 6, with Sunday as 0 and Saturday as 6. A 5 means Friday, a 1 means Monday, and a star means every day of the week. One rule catches people out: if both the day of month and the day of week are set to specific values, most cron systems run the job when either one matches, not when both do. Keep one of them a star unless you know your system's rule.

A worked example: daily, weekly, and custom

Start with the default preset, daily. The expression is 0 9 * * *, and the description reads Runs at 09:00 every day. Read the fields left to right: minute 0, hour 9, and stars for the rest. It is the most common schedule in the world — a morning job, once a day, at a time when people are starting work.

Switch to the weekly preset. The expression becomes 0 9 * * 1, and the description reads Runs at 09:00 on Mondays. The only change is the last field, from a star to 1, and the job goes from every day to one day a week. That single field is the difference between a daily report and a weekly one, which is why the description matters: it makes the change visible.

Now build a custom schedule: choose Custom, set the minute to 30, the hour to 14, and the day of week to Friday, leaving the rest as stars. The expression is 30 14 * * 5, and the description reads Runs at 14:30 on Fridays. It is a Friday-afternoon job — a weekly summary, perhaps, or a clean-up before the weekend.

Try the every-minute preset last: * * * * *, described as Every minute. It is the most frequent schedule, used for health checks and watchers that need to notice problems quickly. It also runs 1,440 times a day, so it is worth asking whether the job needs to run that often — a job that runs every minute should be fast, or it will still be running when the next minute starts.

Who writes cron expressions, and why

System administrators write cron expressions for the jobs that keep servers running: nightly backups, log rotation, certificate renewal, and database clean-up. The expression is the schedule, and the server follows it without supervision. A backup that runs at 02:00 every night because the expression says 0 2 * * * is a backup that happens whether anyone remembers it or not.

Developers schedule reports and notifications the same way. A sales summary at 09:00 every day, a weekly digest on Monday morning, a monthly invoice run on the first of the month — each is one expression, written once and left to run. The description this tool produces is what gets pasted into the ticket or the documentation, so the next person knows what the schedule does.

Content teams schedule publishing and social posts with cron-like tools, and the same five-field thinking applies: when, how often, and on which days. A post that goes out every Friday at 14:30 is 30 14 * * 5, whether the system calls it cron or not. Learning the fields once makes every scheduling tool easier to use.

Analysts schedule data jobs: an overnight import, an hourly refresh, a weekly aggregation. The schedule is part of the pipeline, and a wrong expression means stale data or a job that runs at the wrong time. Building the expression here, reading the description, and then pasting it into the scheduler is the careful way to do it.

Cron expression generator vs writing cron by hand

Writing cron by hand is error-prone in exactly the ways this tool prevents. The field order is easy to mix up — minute and hour look alike, and day of month and day of week sit next to each other. The tool labels each field, so you set the hour in the hour dropdown and the day in the day dropdown, and the expression comes out in the right order every time.

The description is the other half of the value. A hand-written expression of 0 9 * * 1 is easy to misread as daily at nine, because the last field is easy to overlook. The description says Runs at 09:00 on Mondays, which makes the weekly restriction impossible to miss. Check the words, not just the numbers, before you save a schedule.

The presets cover the schedules people actually use, and they are the ones most often written wrong by hand. Hourly is 0 * * * *, not * 0 * * * — the minute is zero and the hour is a star, not the other way round. The preset gets it right, and the description confirms it: at minute 0 of every hour.

For the rest of the toolkit, the companions are nearby: a random number generator for the random values a scheduled job might need, a word counter for counting the lines in a schedule's output, a character counter for counting characters when a schedule is stored in a field with a length limit, and a JSON formatter for formatting the configuration a scheduled job usually reads.

Common cron mistakes

The first mistake is mixing up the field order. Minute comes first, then hour — 0 9 means 09:00, while 9 0 means 00:09. Read the expression left to right, minute then hour, and check the description: if it says 09:00 and you wanted midnight, the first two fields are swapped.

Second: setting both day of month and day of week. Most cron systems run the job when either matches, not when both do, so 0 9 1 * 1 runs on the 1st of the month and on Mondays — not only on Mondays that are the 1st. Keep one of the two a star unless you know your system's rule, and test the schedule before you rely on it.

Third: forgetting that cron uses the server's time zone. An expression that says 09:00 runs at 09:00 server time, which may not be your time. A job scheduled for 09:00 in India runs at 03:30 UTC, and if the server is set to UTC, the job runs in the middle of the night your time. Check the server's time zone before you set a time that matters.

Fourth: scheduling a job more often than it can finish. A job that takes three minutes and runs every minute will pile up, with several copies running at once, each slowing the others down. If a job is slow, schedule it less often, or make it skip a run when the previous one is still going. Every minute is the right schedule for a fast check, and the wrong one for a slow task.

How to use this cron expression generator

Pick a preset from the dropdown: every minute, hourly, daily, weekly, or monthly. Daily at 09:00 is the default, giving 0 9 * * *. The expression and its description appear immediately, with no guessing about field order.

To build a custom schedule, choose Custom, then set the five fields: minute, hour, day of month, month, and day of week. Each dropdown is labelled, and a star means every value for that field. Click the Generate Cron Expression button and the expression is built from your fields.

Read the description before you copy the expression. It says in plain English when the job runs — at 09:00 every day, at 14:30 on Fridays, every minute — and if the words do not match what you wanted, the schedule is wrong. Fix the fields, not the expression, and generate again.

Copy the expression from the results and paste it into your scheduler, your crontab, or your automation tool. Remember that this is a standard 5-field expression: no seconds, no years. And check the time zone of the system that will run it — 09:00 means 09:00 wherever the server thinks it is.

Frequently Asked Questions

It runs at 09:00 every day. Read the five fields left to right: minute 0, hour 9, and stars for day of month, month, and day of week, meaning every value. The description this tool shows is Runs at 09:00 every day. Swap the first two fields to 9 0 * * * and it means 00:09 instead.

A star means the schedule does not restrict that field — every value matches. A star in the minute field means every minute; a star in the day-of-week field means every day. Five stars, * * * * *, means every minute of every hour of every day, which is 1,440 runs a day.

Most cron systems run the job when either one matches, not when both do. So 0 9 1 * 1 runs on the 1st of the month and on Mondays, not only on Mondays that fall on the 1st. Keep one of the two fields a star unless you know your system's rule, and test the schedule before relying on it.

The server's. An expression that says 09:00 runs at 09:00 server time, which may not be your local time — 09:00 in India is 03:30 UTC. Check the time zone of the system that will run the job before you set a time that matters, or the job will run in the middle of the night your time.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.