Cron Expression Generator

Build a cron schedule or paste one to read it in plain English, with the next run times in your time zone or UTC.

Standard 5-field cron, as used by crontab, GitHub Actions and Kubernetes CronJobs.

Common schedules…
0-59
0-23
1-31
1-12 or JAN-DEC
0-6 or SUN-SAT

“At 09:00, on Monday through Friday”

Next 10 runs
UTC

Working out the next runs…

Pick the zone your scheduler uses: a Linux crontab follows the server's time zone (check with date), GitHub Actions uses UTC unless the schedule sets a timezone, and Kubernetes uses the controller's zone unless spec.timeZone is set.

This cron expression generator builds a schedule from five simple fields, or reads an expression you paste, and describes it in plain English. It also lists the next 10 times the job will run in the time zone you choose, which catches the most common cron mistakes (a job in the wrong time zone, on the wrong days, or one that never runs) before you deploy it. It follows standard cron as used by Linux crontab, GitHub Actions, GitLab CI and Kubernetes CronJobs.

The Five Cron Fields

┌───────────── minute (0-59)
│ ┌─────────── hour (0-23)
│ │ ┌───────── day of the month (1-31)
│ │ │ ┌─────── month (1-12 or JAN-DEC)
│ │ │ │ ┌───── day of the week (0-6 or SUN-SAT; 7 is also Sunday)
│ │ │ │ │
0 9 * * 1-5
SymbolMeaningExample
*Every value* in the hour field: every hour
,A list of values1,15: the 1st and 15th
-A range9-17: 09 to 17 inclusive
/A step*/15: every 15th; 9-17/2: 09, 11, 13, 15, 17
@daily and othersShortcuts for common schedules@hourly, @daily, @weekly, @monthly, @yearly

Cron Examples

ExpressionRuns
*/10 * * * *Every 10 minutes
0 * * * *Every hour, on the hour
30 2 * * *Every day at 02:30
0 9 * * 1-5Weekdays at 09:00
0 9-17 * * 1-5Every hour from 09:00 to 17:00 on weekdays
0 0 * * 0Every Sunday at midnight
0 0 1 * *Midnight on the first day of each month
0 0 1 1,4,7,10 *The first day of each quarter
15 3 * * 6Saturdays at 03:15, a typical backup slot

Using the Schedule

In a crontab (opened with crontab -e), the five fields are followed by the command:

30 2 * * * /home/app/backup.sh >> /var/log/backup.log 2>&1

In a GitHub Actions workflow, the expression goes in quotes under schedule:

on:
  schedule:
    - cron: "30 2 * * *"

Cron starts the command with very few environment variables and a minimal PATH, so use full paths to programs and files. Redirecting the output to a log, as above, is the easiest way to find out why a job did not do what you expected.

Daylight Saving Time

In zones with daylight saving time, some local times happen twice in autumn and one hour is skipped in spring. Avoid scheduling jobs between about 01:00 and 03:00 local time in such zones, or schedule in UTC, which never shifts. The run list above shows what happens around a change in the zone you pick; on Linux, the Vixie cron and cronie daemons run jobs from a skipped hour soon after the change and do not repeat jobs in a repeated hour.

Related Tools

Convert the run times to Unix timestamps or between time zones with the Unix timestamp converter. Workflow and CronJob files are YAML; check them with the JSON to YAML converter.

Frequently Asked Questions

What does * * * * * mean in cron?

Run every minute. The five fields are minute, hour, day of the month, month and day of the week, and * in a field means every value. So 0 * * * * runs at minute 0 of every hour, and 0 0 * * * runs once a day at midnight.

How do I run a cron job every 5 minutes?

Use */5 * * * *. The /5 means every fifth value counting from the start of the range, so the job runs at minutes 0, 5, 10 and so on up to 55. Likewise */15 runs every 15 minutes and 0 */2 * * * every two hours.

How do I run a job on weekdays only?

Put 1-5 in the last field: 0 9 * * 1-5 runs at 09:00 Monday to Friday. Days of the week are numbered from 0 for Sunday to 6 for Saturday, 7 is also accepted as Sunday, and names such as MON-FRI work as well.

Why did my cron job run on an unexpected day?

When both day fields are restricted, cron runs the job if either one matches. 0 0 13 * 5 runs on the 13th of every month and on every Friday, not only on Friday the 13th. If either day field starts with *, both must match instead. The description above the run list spells this out for your expression.

What time zone does cron use?

The time zone of whatever runs it. A Linux crontab uses the server's time zone, and cronie also reads a CRON_TZ line in the crontab. GitHub Actions schedules run in UTC unless the workflow sets a timezone for the schedule. Kubernetes CronJobs use the time zone of the kube-controller-manager unless spec.timeZone is set. Pick the same zone above to see the real run times.

Does this support a seconds field?

No. Standard cron has five fields and its smallest unit is one minute. Six- or seven-field expressions with seconds first, and characters such as L, W and #, come from Quartz and are used by Spring, Quartz.NET and some job libraries. The tool explains when an expression is in that format.

Why didn't my GitHub Actions schedule run on time?

GitHub runs scheduled workflows at most every 5 minutes, and runs can be delayed or occasionally dropped when many workflows start at once, especially at the top of the hour; a minute such as 17 instead of 0 helps. In public repositories, scheduled workflows are also turned off after 60 days without activity.