Cron Expression Generator

Write a cron expression or edit the five fields directly, and get a plain-English description plus the next eight scheduled run times — including a warning for the day-of-month trap.

Close-up of a clock face representing scheduled tasks

Photo by Icons8 Team on Unsplash

Cron expression builder

Common schedules

Next 8 runs (your local time)

Updated: 2 August 2026Read: 8 minMethod: POSIX crontab field parsingRuns: 100% in your browser

Key takeaways

  • When both day-of-month and day-of-week are restricted, cron runs when EITHER matches — the fields are ORed, not ANDed.
  • Standard cron has one-minute resolution; anything faster needs systemd timers or a supervisor.
  • Run servers in UTC to avoid daylight saving transitions skipping or duplicating jobs.

The five fields

*  *  *  *  *
|  |  |  |  |
|  |  |  |  +-- day of week   (0-6, Sunday = 0; 7 also accepted)
|  |  |  +----- month         (1-12 or JAN-DEC)
|  |  +-------- day of month  (1-31)
|  +----------- hour          (0-23)
+-------------- minute        (0-59)

Four operators cover almost everything:

OperatorMeaningExample
*Every value* * * * * — every minute
,A list0 9,17 * * * — 09:00 and 17:00
-A range0 9 * * 1-5 — weekdays at 09:00
/A step*/15 * * * * — every quarter hour

Some implementations add a sixth leading field for seconds (Quartz, Spring, node-cron). This parser accepts six fields and ignores the seconds column, since standard Unix cron has one-minute resolution.

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

This is the single most misunderstood rule in cron, and it has caused real production incidents.

When both the day-of-month and day-of-week fields are restricted (neither is *), cron runs the job when either matches — not both. The fields are ORed, not ANDed.

# Intended: the 13th, but only when it is a Friday
0 0 13 * 5

# Actual: EVERY 13th AND EVERY Friday — roughly 60 runs a year

There is no way to express “the 13th if it is a Friday” in standard cron. The usual workaround is to schedule on one field and check the other inside the script:

0 0 13 * *  [ "$(date +\%u)" = "5" ] && /path/to/job.sh

The tool spells this out in the description whenever both fields are restricted.

Time zones and daylight saving

Cron uses the system time zone by default, which means daylight saving transitions can skip or repeat jobs:

  • Spring forward. Clocks jump from 02:00 to 03:00, so a job scheduled at 02:30 simply does not run that day.
  • Autumn back. 02:00 to 03:00 happens twice, so a job at 02:30 may run twice.

Vixie cron on most Linux distributions tries to compensate for jobs scheduled in the skipped hour, but the behaviour differs between implementations and is not something to rely on.

Set servers to UTC. It is the single most effective fix: no DST transitions, no ambiguity, and logs from different regions line up. If a job must run at a local wall-clock time, set CRON_TZ=Europe/Paris at the top of the crontab (Vixie cron) or TZ in the job’s own environment. Convert between zones with the timestamp converter.

Special strings and best practice

Most cron implementations accept named shortcuts:

StringEquivalent
@yearly / @annually0 0 1 1 *
@monthly0 0 1 * *
@weekly0 0 * * 0
@daily / @midnight0 0 * * *
@hourly0 * * * *
@rebootOnce at startup

Practical rules

  • Use absolute paths. Cron runs with a minimal environment and a PATH that is usually just /usr/bin:/bin.
  • Redirect output. Anything a job prints is emailed to the crontab owner. Append >> /var/log/job.log 2>&1.
  • Prevent overlap. Cron will happily start a second copy while the first is running. Wrap the command in flock -n /tmp/job.lock.
  • Avoid the top of the hour. Everyone schedules at :00; stagger to :07 or :23 to spread load.
  • Escape percent signs. In crontab, % means a newline — write \% in date formats.

Frequently Asked Questions

What does * * * * * mean?

Every minute of every hour of every day. It is the most frequent schedule standard cron can express, since the resolution is one minute.

How do I run a cron job every 5 minutes?

Use */5 * * * *. The slash operator sets a step, so this fires at :00, :05, :10 and so on.

Why does my job run more often than expected?

Almost always the day-of-month / day-of-week rule: when both fields are restricted, cron runs when either matches, not both.

What time zone does cron use?

The system time zone unless overridden with CRON_TZ or TZ. Running servers in UTC avoids the daylight saving edge cases entirely.

What is the difference between 0 and 7 for Sunday?

Both mean Sunday. The day-of-week field accepts 0-7 where 0 and 7 are the same day, a compatibility quirk inherited from early cron implementations.

Can cron run every second?

No. Standard cron has one-minute resolution. Use systemd timers, a supervisor process or a loop with sleep for sub-minute scheduling.

What happens if a job is still running when the next one starts?

Cron starts another copy regardless. Use flock or a lock file to prevent overlapping runs.

Sources & further reading

  1. POSIX: crontab — the standard field definitions and operators
  2. man 5 crontab — Vixie cron behaviour, including CRON_TZ and DST handling
  3. Wikipedia: Cron — history and the differences between implementations
  4. man 1 flock — the standard way to prevent overlapping cron runs