KickSolve • Free • Private

Cron Expression Generator & Explainer

Build, validate and understand cron schedules. Type an expression or fill in the fields, get a plain-English explanation, see exactly when it will run next, and copy ready-made crontab, Kubernetes and GitHub Actions snippets.

5 & 6 field cronNext run timesPlain-English explanationRuns in your browser
1. Enter or build your cron expressionminute hour day-of-month month day-of-week
Examples

How to use the cron expression generator

Follow these steps to turn an idea such as “every weekday at 9 AM” into a checked cron schedule.

  1. Start with an expression or a preset. Paste an existing schedule into the main box, or open Examples and pick the closest match, such as “Weekdays at 9 AM”.
  2. Adjust the individual fields. Edit minute, hour, day of month, month and day of week in their own boxes. The main expression updates as you type. Use the symbol keys to insert *, */5, commas, dashes and slashes.
  3. Add seconds only if your scheduler needs them. Tick Include seconds for Quartz-style or Spring-style schedulers. Leave it off for classic crontab, Kubernetes and GitHub Actions.
  4. Read the plain-English explanation. Check that the sentence says what you intended. If it does not, the field breakdown shows exactly which value caused the difference.
  5. Check the next run times. Choose your local time zone or UTC, then confirm the first few runs fall when you expect. This is the quickest way to catch a wrong hour, a missed weekday or a date that never occurs.
  6. Copy the result. Add your command, then copy the crontab line, Kubernetes CronJob or GitHub Actions snippet, or copy the full summary to share with your team.

Tip: if you see an error message, it names the field and the allowed range, so you can fix the exact value.

How the cron expression generator works

The page checks every field against the cron rules, then works out the schedule for you.

1. Parse the fieldsSplit the expression into 5 fields, or 6 with seconds, and expand lists, ranges, steps, names and macros.
2. Validate each valueReject out-of-range numbers, backwards ranges and bad steps with a message that names the field.
3. Explain in EnglishTurn the matched values into a sentence such as “At 09:00, on Monday through Friday”.
4. Calculate run timesWalk forward day by day and list the next moments that match, using standard cron day rules.
5. Build snippetsDrop the expression into crontab, Kubernetes and GitHub Actions formats.

Cron syntax explained

A cron expression is five fields separated by spaces. Each field narrows down when the job may run.

What is a cron expression?

A cron expression is a short text schedule read by cron and by many cron-style schedulers. A job runs when the current time matches every field at once. For example, 30 2 * * 0 means minute 30, hour 2, any day of the month, any month, and Sunday, which together read as “02:30 every Sunday”.

The fields and their allowed values

PositionFieldAllowed values
1 (6-field only)Second0–59
1Minute0–59
2Hour0–23 (24-hour clock)
3Day of month1–31
4Month1–12 or JAN–DEC
5Day of week0–7 or SUN–SAT (both 0 and 7 mean Sunday)

In a 6-field expression the seconds field comes first and every other field moves one place to the right.

Special characters

CharacterMeaningExample
*Every value allowed in the field* * * * * runs every minute
,A list of values0 8,12,17 * * * runs at 08:00, 12:00 and 17:00
-An inclusive range0 9-17 * * * runs on the hour from 09:00 to 17:00
/A step, counted from the start of the range*/10 * * * * runs every 10 minutes; 5-30/5 runs at 5, 10, 15, 20, 25 and 30
?No specific value (treated like * here)0 0 ? * MON

Shortcut macros

MacroSame asRuns
@hourly0 * * * *Once an hour
@daily or @midnight0 0 * * *Once a day at midnight
@weekly0 0 * * 0Sundays at midnight
@monthly0 0 1 * *The 1st of the month at midnight
@yearly or @annually0 0 1 1 *1 January at midnight

@reboot also exists in some crontab implementations, but it runs once at startup rather than on a schedule, so there is nothing to explain or list.

How steps really work

A step starts counting from the beginning of the field’s range, and the count restarts when the field wraps. */7 in the minute field fires at minutes 0, 7, 14 and so on up to 56, and then again at minute 0 of the next hour. That is a gap of only 4 minutes, so it is not “every 7 minutes” across hours. Steps that divide evenly into 60 (such as 5, 10, 15, 20 and 30) avoid this.

Day of month and day of week use OR

When both the day-of-month and day-of-week fields are restricted, standard cron runs the job when either one matches. 0 0 13 * 5 runs on the 13th of every month and also on every Friday, not only on Friday the 13th. If either field is *, the other field decides alone. The generator shows a note whenever this rule applies.

Cron expression examples

Common schedules you can open in the generator with one click.

Every few minutes and hours

ExpressionMeaningOpen
* * * * *Every minuteTry it
*/5 * * * *Every 5 minutesTry it
*/10 * * * *Every 10 minutesTry it
*/15 * * * *Every 15 minutesTry it
0,30 * * * *At minute 0 and minute 30 of every hourTry it
0 * * * *Every hour, on the hourTry it
0 */2 * * *Every 2 hours, at minute 0Try it
0 9-17 * * 1-5On the hour from 09:00 to 17:00, Monday to FridayTry it

Daily and weekly schedules

ExpressionMeaningOpen
0 0 * * *Every day at midnightTry it
30 3 * * *Every day at 03:30Try it
0 6,18 * * *Twice a day, at 06:00 and 18:00Try it
0 9 * * 1-5Weekdays at 09:00Try it
30 7 * * 1Every Monday at 07:30Try it
0 10 * * 6,0Weekends at 10:00 (Saturday and Sunday)Try it

Monthly and yearly schedules

ExpressionMeaningOpen
0 0 1 * *Midnight on the 1st of every monthTry it
0 0 1,15 * *Midnight on the 1st and the 15thTry it
0 0 1 */3 *Midnight on the 1st, every 3 months (January, April, July, October)Try it
0 0 1 1 *Midnight on 1 January, once a yearTry it
0 0 * JAN-MAR MONEvery Monday at midnight from January to MarchTry it

Schedules cron cannot express directly

The last day of the month. Standard 5-field cron has no “last day” symbol. A common workaround is to run on days 28 to 31 and let the command check whether tomorrow is the 1st:

0 0 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job.sh

This uses GNU date. Note the backslash before each %, which crontab requires. Quartz-style schedulers have a built-in L for this.

Every 90 minutes. No single expression repeats on a 90-minute cycle, but two entries can cover it:

0 0-23/3 * * *   /path/to/job.sh
30 1-23/3 * * *  /path/to/job.sh

The first runs at 00:00, 03:00, 06:00 and so on. The second runs at 01:30, 04:30, 07:30 and so on. Together they fire every 90 minutes, starting at midnight.

The first Monday of the month. This also needs a command-side check, such as running every Monday and testing that the day of the month is 7 or less.

Cron syntax on different platforms

“Cron” is not one exact standard. The same five-looking fields can behave differently depending on where the schedule runs.

PlatformFieldsThings to know
Linux / Unix crontab5Month and weekday names and @ macros are supported. The day-of-month and day-of-week OR rule applies. Runs in the server time zone.
Kubernetes CronJob5Set spec.timeZone to run in a specific IANA time zone, otherwise the controller’s time zone is used.
GitHub Actions5Scheduled workflows run in UTC, the shortest interval is 5 minutes, and runs can start late when GitHub is busy.
Quartz Scheduler6 or 7Seconds come first and an optional year comes last. One of the two day fields must be ?. Adds L, W and #, and counts weekdays from 1 for Sunday.
Spring @Scheduled6Seconds come first. Supports extra symbols such as L, W and #, and a separate zone attribute.
AWS EventBridge rules6Written as cron(minutes hours day-of-month month day-of-week year). One of the two day fields must be ?. Rule schedules run in UTC.
Jenkins5Adds an H hash symbol that spreads jobs across the hour to avoid everything starting together.

What this generator supports

The generator checks standard 5-field cron and the common 6-field form with seconds first. It does not accept platform-specific extras such as L, W, #, H or a year field, and it tells you when it meets one. Always read your platform’s documentation for the final syntax, then use the next run times here to confirm the schedule behaves as you expect.

Time zones and daylight saving

A cron expression contains no time zone. The scheduler decides which clock to read, and that is the most common reason a job fires at a surprising hour. Classic cron follows the server’s clock, GitHub Actions uses UTC, and Kubernetes uses the controller’s time zone unless spec.timeZone is set.

Choosing between local time and UTC

  • Use UTC for infrastructure jobs such as backups, cleanups and data syncs. UTC has no daylight saving changes, so the schedule never shifts.
  • Use a named local time zone only when the job must match business hours, such as a report sent at 08:00 for a particular office, and only where your scheduler supports named zones.

Daylight saving pitfalls

In a time zone that changes its clocks, a local time such as 02:30 may not exist on the spring-forward day and may happen twice on the fall-back day. Depending on the scheduler, a job in that window can be skipped or run twice. Avoid scheduling important local-time jobs between 01:00 and 03:00, or schedule them in UTC.

Use the time zone selector above the results to see the next runs in UTC or in your own time zone, and the time zone converter to translate a run time for a colleague elsewhere.

Best practices for reliable cron jobs

Typical uses

Cron schedules are used for database backups, log rotation and cleanup, sending scheduled reports, syncing data between systems, renewing certificates, clearing caches and running health checks.

Habits that prevent surprises

  • Use absolute paths. Cron runs commands with a minimal environment, so write /usr/bin/python3 /opt/app/job.py rather than relying on PATH.
  • Capture output. Redirect it to a log file, for example >> /var/log/myjob.log 2>&1, so failures leave a trace.
  • Prevent overlapping runs. If a job can take longer than its interval, wrap it with a lock such as flock so two copies never run at once.
  • Spread the load. Many jobs set to minute 0 start at the same moment. Pick an odd minute such as 7 or 23 for non-urgent jobs.
  • Make jobs safe to repeat. A job that can run twice without harm survives clock changes, retries and manual re-runs.
  • Monitor that it ran. Alert on a missing success signal, not only on errors, because a job that never starts produces no error.
  • Test the command first. Run it by hand as the same user, then confirm the schedule with the next run times on this page before saving it.
  • Keep schedules in version control. Store the crontab, Kubernetes manifest or workflow file in your repository so changes are reviewed.

Why a cron job does not run

Work through these checks in order. Most problems are in the first four.

  1. The schedule is not what you think. Paste the expression into the generator and compare the explanation and the next run times with your intent. Watch for the day-of-month and day-of-week OR rule and for dates that do not exist, such as 30 February.
  2. The time zone differs. Compare the server’s date output with UTC and with the zone you assumed.
  3. The environment is minimal. A command that works in your shell may fail in cron because PATH and other variables are not set. Use absolute paths or set PATH at the top of the crontab.
  4. A percent sign is in the command. In a crontab line an unescaped % is treated as a newline. Write \% instead, for example in a date +\%F call.
  5. The script cannot run. Check the executable bit, the shebang line and file permissions for the user that owns the crontab.
  6. Output is hidden. Redirect standard output and standard error to a log file so you can see errors.
  7. The job is in the wrong file. Per-user crontabs are edited with crontab -e and listed with crontab -l. System files such as /etc/crontab and /etc/cron.d/ need an extra user-name column before the command.
  8. The cron service is stopped. Confirm that the cron or crond service is running.
  9. The platform adds its own rules. GitHub Actions only runs schedules from the default branch and may delay them, and Kubernetes jobs can be skipped if the controller was down.

Frequently asked questions

Answers to common questions about cron expressions, schedules and troubleshooting.

What is a cron expression?

A cron expression is a short text schedule made of five fields (minute, hour, day of month, month and day of week) that tells a scheduler when to run a job. Some systems add a sixth field for seconds at the start.

What does */5 * * * * mean?

It runs every 5 minutes, all day, every day. The */5 in the minute field means every 5th minute starting at minute 0, so 0, 5, 10 and so on.

How do I run a cron job on weekdays only?

Put 1-5 in the day-of-week field. For example 0 9 * * 1-5 runs at 09:00 from Monday to Friday.

What happens when both the day-of-month and day-of-week fields are set?

Standard cron runs the job when either field matches, not when both match. 0 0 1 * 1 runs on the 1st of every month and also every Monday. If one of the two fields is *, the other decides alone. This tool follows that rule and shows a note when it applies.

How many fields does a cron expression have, and what is the difference between 5 and 6 fields?

Classic crontab, Kubernetes and GitHub Actions use 5 fields. Quartz-style schedulers and many libraries use 6 fields with seconds first, and some add a seventh field for the year. Tick Include seconds to work with the 6-field form.

Is Sunday 0 or 7 in cron?

Both work in standard cron, so 0 12 * * 0 and 0 12 * * 7 mean the same thing. Quartz-style schedulers number the days differently and count Sunday as 1, so check your platform before copying an expression.

Which time zone do cron jobs use?

It depends on the scheduler. Classic cron uses the server time zone, GitHub Actions uses UTC, and Kubernetes CronJobs use the controller time zone unless spec.timeZone is set. The next run times here can be shown in your local time or UTC.

How do I run a job on the last day of the month?

Standard 5-field cron has no last-day symbol. Run the job on days 28 to 31 and have the command check whether tomorrow is the 1st, or use a Quartz-style scheduler that supports L. The examples section shows the shell check.

How do I schedule a job every 90 minutes?

One expression cannot repeat every 90 minutes, but two can: 0 0-23/3 * * * and 30 1-23/3 * * *. Together they run at 00:00, 01:30, 03:00, 04:30 and so on.

How can I test a cron expression before deploying it?

Paste it into the generator, read the plain-English explanation, and check the list of next run times in the time zone your scheduler uses. Then run the command once by hand as the same user to confirm it works outside your interactive shell.

Why does my cron expression never run?

The most common cause is a date that does not exist, such as day 30 in February. If no run is found within the next ten years, this page tells you. Other causes are a different time zone, a minimal environment, or an unescaped percent sign in a crontab command.

Does this tool support L, W, # or H?

No. The generator checks standard 5-field cron and 6-field cron with seconds first. Platform-specific symbols such as L, W, # and H, and the optional year field, are not accepted, and you will see an error if you use one.

Can I use these expressions in Kubernetes CronJobs and GitHub Actions?

Yes, both use the standard 5-field format. The snippet section produces ready-to-paste examples for each. Remember that GitHub Actions schedules run in UTC and cannot repeat more often than every 5 minutes.

Is the cron expression generator free and private?

Yes. It runs in your browser without an account, and your expression and command are not sent to a server.