Cron Expression Generator

A cron expression generator builds a schedule for a cron job without memorizing five-field crontab syntax. Set the minutes, hours, days, and months, and the tool produces a valid expression like 0 9 * * 1-5 to paste into your crontab. The guide below explains each field, the operators, and common examples.

Presets:

How cron fields work

A standard cron expression has five fields, always in this order:

* * * * *
│ │ │ │ └── day of week (0–6, where 0 and 7 both mean Sunday)
│ │ │ └──── month (1–12)
│ │ └────── day of month (1–31)
│ └──────── hour (0–23)
└────────── minute (0–59)

The most common beginner mistake is swapping the first two fields: minute comes before hour. So 30 9 * * * means 9:30 AM, while 9 30 * * * is invalid. Read any expression left to right, translating each field in plain language.

Special operators reference

Each field accepts more than plain numbers. These operators work in every standard cron implementation:

OperatorNameWhat it doesExample
*AsteriskEvery possible value for the field* * * * * runs every minute
,CommaA list of specific values0 9,17 * * * runs at 9 AM and 5 PM
-HyphenA range of values0 9 * * 1-5 runs Monday to Friday
/SlashStep values (intervals)*/15 * * * * runs every 15 minutes

Step values pair with ranges too: 0 9-17/2 * * * runs at 9, 11, 13, 15, and 17 o'clock.

How to use it

  1. Set the schedule using the minute, hour, day-of-month, month, and day-of-week fields, or start from a preset.
  2. Read the plain-language explanation the tool generates — for example, */10 * * * * becomes "every 10 minutes" — and confirm it matches what you intended.
  3. Copy the expression and paste it into your crontab with crontab -e, followed by the command to run, e.g. */10 * * * * /usr/bin/php /var/www/backup.php.

What it expects

A valid five-field cron expression: five groups of numbers, ranges, lists, steps, or asterisks separated by spaces, in minute–hour–day-of-month–month–day-of-week order. You can also paste an expression to have it explained and validated — the tool flags impossible values such as a 61st minute or a 13th month.

Worked schedule examples

ScheduleExpressionNotes
Every 5 minutes*/5 * * * *The classic "cron every 5 minutes" pattern
Every day at 9:00 AM0 9 * * *Server-local time unless TZ is set
Weekdays at 6:00 PM0 18 * * 1-51–5 = Monday to Friday
First day of the month at midnight0 0 1 * *Day-of-month restricted, day-of-week wildcarded
Every Sunday at 2:30 AM30 2 * * 00 = Sunday (7 also works in most implementations)
Twice a day, 8 AM and 8 PM0 8,20 * * *Comma-separated hours
Every 2 hours during work hours0 9-17/2 * * *Runs at 9, 11, 13, 15, 17

5-field vs 6-field cron

Standard system cron (Vixie/ISC cron on Linux) uses five fields. Some schedulers add a sixth field for seconds at the front — Quartz (Java) and AWS EventBridge use seconds minutes hours day-of-month month day-of-week, so "every 5 minutes" becomes 0 0/5 * * * ? where ? means "no specific value". Before deploying, check which dialect your scheduler expects: pasting a 5-field expression into a 6-field scheduler (or vice versa) is one of the most common causes of jobs silently running at the wrong time. By default, this tool generates standard 5-field expressions; enable the Quartz toggle above for 6-field (seconds) mode.

Timezone and daylight saving notes

Cron evaluates schedules in the system's local time zone unless you set TZ at the top of the crontab (e.g. TZ=UTC). Watch out for daylight saving transitions: a job at 2:30 AM is skipped on spring-forward and runs twice on fall-back. For time-critical jobs, run the system on UTC.

Why cron jobs fail silently

When a schedule looks right but nothing happens, the expression is rarely the cause. Check that the cron daemon is running, use absolute paths in the command (cron has a minimal PATH), and redirect output to a log while debugging: >> /var/log/myjob.log 2>&1. Also note that restricting both day-of-month and day-of-week makes cron run when either matches: 0 0 1 * 0 runs on the 1st and every Sunday.

Frequently asked questions

What does */5 * * * * mean in cron?
It means every 5 minutes. The */5 in the minute field is a step value: start at minute 0 and repeat every 5 minutes, so the job runs at :00, :05, :10, and so on. The remaining four fields are wildcards, so no restriction applies to the hour, day of month, month, or day of week.
What is the difference between 5-field and 6-field cron expressions?
Standard Linux cron uses five fields: minute, hour, day of month, month, day of week. Quartz, AWS EventBridge, and some other schedulers add a sixth field for seconds at the beginning, plus a ? placeholder meaning no specific value. A 5-field expression pasted into a 6-field scheduler will be misread, so always check which dialect your platform expects before deploying.
How do I run a cron job every day at a specific time?
Use 0 for the minute and the hour in 24-hour format, with wildcards for the rest. For 9:30 AM daily, the expression is 30 9 * * *. Remember the field order is minute first, then hour — writing 9 30 * * * is invalid because there is no 30th hour.
Why didn't my cron job run at the scheduled time?
The usual causes are not the expression itself: the cron daemon may not be running, the command may rely on a PATH or environment variable missing from cron's minimal environment, or the job may be evaluated in a different time zone than you assumed. Redirect output to a log file while debugging to capture errors.
Can I specify both a day of the month and a day of the week?
Yes, but be careful: when both fields are restricted, cron runs the job when either one matches, not when both match. So 0 0 1 * 0 runs on the 1st of every month and on every Sunday. This OR behavior surprises many people; if you need the first Sunday of the month, use an extended dialect that supports the # operator or add a date check inside your script.
How do I schedule a job for every 90 minutes in cron?
Cron step values must divide the field range evenly, and 90 does not divide 60, so there is no clean every 90 minutes expression. The practical workaround is to run the job every 30 minutes and have the script check whether 90 minutes have elapsed since its last run.
Does cron run in UTC or local time?
Cron uses the system's local time zone by default. You can override it per crontab by setting TZ at the top, for example TZ=UTC on its own line before any job entries. For servers that observe daylight saving time, note that jobs scheduled inside the skipped or repeated hour will be missed or doubled on transition days.

Further reading