Cron Expression Generator

Build, validate and understand cron expressions. See the next scheduled run times.

Presets

Min
Hr
Day
Mon
Wkd
At 09:00 on Monday through Friday

Cron Expression Syntax

A cron expression consists of five fields separated by spaces: minute hour day-of-month month day-of-week. Each field accepts specific values, ranges, wildcards, and step values.

FieldAllowed valuesSpecial characters
Minute0-59* , - /
Hour0-23* , - /
Day of month1-31* , - /
Month1-12 or JAN-DEC* , - /
Day of week0-7 (0 and 7 = Sun) or SUN-SAT* , - /

How to use the cron generator

  1. Start from a preset on the left, or type an expression directly.
  2. Read the plain-English description underneath to check it says what you mean.
  3. Look at the list of upcoming runs. That's the real test, especially for schedules that combine days of the month and days of the week.
  4. Copy the expression into your crontab, CI configuration or scheduler.

The five fields

A cron expression is five fields separated by spaces, read left to right from the smallest unit to the largest: minute, hour, day of month, month, day of week. A job runs whenever the current time matches all of them (with one exception, covered below).

┌──────── minute (0–59)
│ ┌────── hour (0–23)
│ │ ┌──── day of month (1–31)
│ │ │ ┌── month (1–12 or JAN–DEC)
│ │ │ │ ┌ day of week (0–7 or SUN–SAT)
│ │ │ │ │
30 2 * * 1-5   →  02:30 on weekdays

Each field accepts the same building blocks:

  • *: every value.
  • 5: exactly that value.
  • 1,15: a list.
  • 9-17: an inclusive range.
  • */10: every 10th value, starting from the lowest. 0-30/10 limits that to a range.

Many implementations also accept shortcuts like @daily, @hourly and @weekly; this page understands them too.

The day-of-month / day-of-week trap

This catches almost everyone once. If you restrict both the day-of-month and day-of-week fields, cron runs the job when either matches. 0 9 1-7 * 1looks like "9am on the first Monday of the month", but it actually fires every day from the 1st to the 7th and every Monday. Paste it above and look at the run list to see it happen.

The reliable way to get "first Monday" is to schedule 0 9 1-7 * *and have the script exit early unless it's Monday, for example with [ "$(date +\%u)" = 1 ] && /path/to/job. (Inside a crontab, % must be escaped, hence the backslash.)

Before you deploy a cron job

  • Check the time zone. A job meant for 9am in Paris that runs on a UTC server fires at 10 or 11 local time depending on the season.
  • Avoid the DST hour. In zones with daylight saving, a job scheduled between 02:00 and 03:00 can be skipped once a year and run twice on another day. Schedule outside that window, or run the server in UTC.
  • Use full paths. Cron runs with a minimal PATH, so python may not resolve the way it does in your shell.
  • Capture output. Append >> /var/log/myjob.log 2>&1, or failures will vanish silently.
  • Prevent overlaps. If a run can take longer than the interval, wrap it with flock -n /tmp/myjob.lock so two copies never run at once.
  • Spread the load. Everyone schedules things at 0 0 * * *. Picking an odd minute like 17 3 * * * avoids contention on shared infrastructure and rate-limited APIs.

Want more examples? Our guide Cron expressions explained, with 25 real examples covers the schedules people search for most, from every 5 minutes to the last day of the month.

Frequently asked questions

What time zone does cron use?+

Classic cron uses the server's local time zone, which on most cloud servers is UTC. Managed schedulers vary: GitHub Actions and AWS EventBridge rules are always UTC, while Kubernetes CronJobs accept a timeZone field. The run times shown on this page are in your browser's time zone, so convert if your server differs.

Why does my job run on the 1st AND every Monday?+

When both the day-of-month and day-of-week fields are restricted, standard cron runs the job when either one matches, not both. So 0 0 1 * 1 fires on the 1st of the month and on every Monday. To get 'the first Monday', restrict the day of month to 1-7 and check the weekday inside your script.

Is Sunday 0 or 7?+

Both. Standard cron accepts 0 and 7 for Sunday, and you can also write SUN. Monday is 1, Saturday is 6. Quartz uses a different scheme (1 = Sunday, 7 = Saturday), which is a common source of off-by-one bugs.

Can cron run a job every 30 seconds?+

No, the smallest unit is one minute. The usual workaround is two entries for the same command, one of them prefixed with sleep 30. If you need sub-minute precision regularly, a systemd timer or a long-running worker is a better fit.

Why is my expression with ? or L rejected?+

Those characters come from Quartz, the Java scheduler, along with a sixth field for seconds. Linux crontab, Kubernetes, GitHub Actions and most other tools use the standard 5-field syntax this page validates, so they'd reject them too.

Last updated October 16, 2026