Cron Expression Builder

Write or paste a cron schedule: see what it means in plain English, the next run times in your time zone, and the line for crontab, systemd, GitHub Actions or Kubernetes.

Runs in your browser. Nothing is uploaded.

Updated

Cron expressionRuns in your browser · crontab syntax (cronie / Vixie cron)

Runs At 09:00, Monday to Friday.

FieldValueMeans
Minute0–59
Pick values
0
Hour0–23
Pick values
9
Day of month1–31
Pick values
every day
Month1–12 or Jan–Dec
Pick values
every month
Day of week0–7 or Sun–Sat (0 and 7 are Sunday)
Pick values
Mon to Fri

Next runs

Working out the next runs…

Use it

crontab line (crontab -e)
0 9 * * 1-5 /path/to/command
systemd timer ([Timer] section)
OnCalendar=Mon..Fri *-*-* 09:00:00
GitHub Actions workflow
on:
  schedule:
    - cron: "0 9 * * 1-5"
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
spec:
  schedule: "0 9 * * 1-5"

GitHub and Kubernetes use UTC unless you add a time zone (pick one above).

Runs in your browser; nothing is sent to our server. The expression is kept in the page address after #, so you can bookmark or share it.

How to use Cron Expression Builder

  1. Type an expression, pick a preset, or set each field.
  2. Read what it means and check the next run times.
  3. Copy the line for crontab, systemd, GitHub Actions or Kubernetes.

Cron Expression Builder at a glance

Typical use: Check that “*/15 9-17 * * 1-5” really means every 15 minutes in office hours.

Runs in your browser; nothing is sent to our server. Follows the cron of Debian, Ubuntu, Fedora and RHEL (cronie / Vixie cron).

When to use Cron Expression Builder

Write a cron schedule and check it before it goes live: the page says in plain English when it runs, lists the next ten run times in your server’s time zone, and gives the line for your crontab, a systemd timer, GitHub Actions or a Kubernetes CronJob. Paste a schedule you found in a config file to find out what it does.

The page follows the cron used on Debian, Ubuntu, Fedora and RHEL (cronie and Vixie cron). Its results were checked against cronie itself. Everything runs in your browser.

The five fields

FieldValuesExample
Minute0–5930 = at half past
Hour0–239-17 = 9 a.m. to 5 p.m.
Day of month1–311,15 = the 1st and 15th
Month1–12 or Jan–Decjan-mar = January to March
Day of week0–7 or Sun–Sat (0 and 7 are Sunday)1-5 = Monday to Friday

In every field, * means “every”, , separates a list, - gives a range and / a step: */10 is every 10th value from the start, 10-50/20 is 10, 30 and 50.

Common schedules

ExpressionRuns
*/5 * * * *Every 5 minutes
0 * * * *Every hour, on the hour
30 2 * * *Every day at 02:30
0 9 * * 1-5Weekdays at 09:00
*/15 9-17 * * 1-5Every 15 minutes in office hours
0 0 * * 0Every Sunday at midnight
0 3 1 * *At 03:00 on the 1st of each month
0 0 1 1,4,7,10 *At midnight on the first day of each quarter
@rebootOnce, when the server starts

The day-of-month and day-of-week trap

When both day fields are set, cron runs on days that match either of them, not both. 0 9 1-7 * 1 runs on the 1st to the 7th and on every Monday, not only on the first Monday. If either field starts with *, both must match. The page points this out whenever it applies. For “the first Monday of the month”, schedule Mondays and check the date in the command.

Time zones and clock changes

Cron uses the server’s time zone, which is often UTC on cloud servers; check it with timedatectl or date. Where clocks change for summer time, a job set for a time that is skipped runs right after the change, and a job set for a time that happens twice runs once. Jobs with * in the minute or hour field simply follow the clock. The run list marks those days. GitHub Actions and Kubernetes use UTC unless you add a time zone, which the page does for you when you pick one.

Prefer the terminal?

To add the schedule on a Linux or macOS server, open your crontab and paste the line:

crontab -e

“crontab -l” lists your jobs. Use full paths in the command (cron starts with a minimal PATH), and add “>> /tmp/job.log 2>&1” while testing so you can see the output.

References

Frequently asked questions

Why does my job work in the terminal but not from cron?

Cron runs commands with a minimal environment: a short PATH, no shell profile and often a different user. Use full paths to programs and files, escape % as \% in the crontab, and send the output to a log file (>> /tmp/job.log 2>&1) to see the error.

Can cron run a job every 30 seconds?

Not directly: the smallest unit is a minute. Common workarounds are two entries, one of them starting with “sleep 30;”, or a systemd timer, which supports seconds.

What about expressions with 6 or 7 fields?

Those are other formats. Quartz (Java), Spring and node-cron add seconds at the start, and AWS EventBridge adds a year at the end, along with ? L W and #. The page recognises them and shows the five-field version where there is one.

Is */7 really every 7 minutes?

Within each hour only: */7 means minutes 0, 7, 14 … 56, and then 0 again, so the gap between 56 and the next 0 is 4 minutes. Steps that divide 60 (5, 10, 15, 20, 30) are even.

Does GitHub Actions run my schedule exactly on time?

Not always. GitHub runs scheduled workflows at most every 5 minutes, and runs may start late or be dropped when GitHub is busy, especially at the start of an hour. Picking an odd minute such as 17 helps.

Is anything I type sent to your server?

No. The page works out everything in your browser. The expression is kept in the address after #, which browsers don’t send to the server, so you can bookmark or share it.