Free developer tool

Cron Expression Generator

Build a crontab schedule from plain-English options, or paste an expression and see what it really does. You get the cron string, a readable description, the exact next run times and a copy-ready crontab line.

  • Next 8 run times
  • Build or parse
  • Handles the day-of-week OR rule
  • Local time and UTC
Build a schedule
Or edit the five fields
0–59
0–23
1–31
1–12
0–6

Accepts *, ranges like 1-5, steps like */15, lists like 0,30 and names like MON or JAN.

Command & presets
Cron expression 0 3 * * *

At 03:00, every day

crontab -e

Next 8 runs in your local time

Field by field

Why this cron generator is different

Cron syntax is compact and unforgiving. The mistakes people make are almost never typos — they are schedules that parse fine and then run at completely the wrong times.

Real next run times

The next eight executions are calculated properly, not estimated. It is the fastest way to confirm a schedule does what you meant before you trust it in production.

The day-of-week trap, handled

When both day-of-month and weekday are set, cron matches either, not both. Most tools get this wrong. This one implements the real rule and warns you when it applies.

Works in both directions

Pick options from menus to build an expression, or type any existing expression into the five fields and read back exactly what it means.

Local time and UTC together

Servers usually run UTC while you think in local time. Every run is shown in both, so the off-by-five-hours surprise never happens.

Plain-English breakdown

Each of the five fields is explained separately, so you can see which part of the expression is doing what rather than guessing.

Nothing leaves your browser

Your commands and server paths are never sent anywhere. No account, no libraries, no tracking.

How to use the cron expression generator

  1. 1

    Pick a frequency

    Choose how often the job should run and the tool fills in the five fields for you. Or hit a preset to start from a common pattern.

  2. 2

    Fine-tune the fields

    Edit minute, hour, day, month and weekday directly if you need something the menus do not cover.

  3. 3

    Check the next runs

    Read the next eight execution times in local time and UTC. If they are not what you expected, the expression is wrong, not the clock.

  4. 4

    Copy the crontab line

    Add your command, copy the finished line, and paste it into crontab -e on your server.

How cron syntax works

A crontab entry is five whitespace-separated fields followed by the command to run. Each field describes one unit of time, and the job fires when all of them match the current minute.

* * * * * command to execute │ │ │ │ │ │ │ │ │ └─ day of week (0-6, Sunday = 0) │ │ │ └─── month (1-12) │ │ └───── day of month (1-31) │ └─────── hour (0-23) └───────── minute (0-59)

Operators

  • * — every value for that field
  • 5 — that exact value
  • 1-5 — a range, inclusive at both ends
  • 1,15,30 — a list of specific values
  • */15 — a step, so every 15th value starting from the lowest
  • 9-17/2 — a step within a range
  • MON, JAN — three-letter names, accepted for weekday and month

Shorthand strings

Most cron implementations also accept @yearly, @monthly, @weekly, @daily, @hourly and @reboot in place of the five fields. They are readable but inflexible — @daily always means midnight, which is exactly when every other job on the server also runs.

Mistakes that bite people

Day-of-month and weekday are OR, not AND

This is the single most misunderstood rule in cron. If both the day-of-month and weekday fields are restricted, the job runs when either matches. So 0 0 1 * MON runs on the 1st of every month and on every Monday — not only on Mondays that fall on the 1st. To get an AND, leave one field as * and test the other inside your script.

Steps do not mean “every N from now”

*/40 * * * * does not run every 40 minutes. It runs at minute 0 and minute 40, then jumps back to 0 at the top of the next hour — a 20-minute gap. Steps only divide evenly when they are a factor of 60.

Server time is probably not your time

Cron uses the system timezone, which on most cloud servers is UTC. A job set for 09:00 will run at 09:00 UTC regardless of where you are. Check with timedatectl or date before assuming.

The environment is nearly empty

Cron runs with a minimal PATH and none of your shell profile. Always use absolute paths for both the interpreter and the script — /usr/bin/php /var/www/html/cron.php, never just php cron.php.

Percent signs need escaping

In a crontab, an unescaped % is turned into a newline. Any date format string such as date +\%Y-\%m-\%d must have each percent sign escaped with a backslash.

Output goes to mail, or nowhere

Anything a job prints is emailed to the crontab owner, and quietly discarded if no mailer exists. Redirect explicitly — append >> /var/log/myjob.log 2>&1 so you have something to read when it fails.

Common cron expressions

Frequently used cron schedules and their meaning
ExpressionWhen it runs
* * * * *Every minute
*/5 * * * *Every 5 minutes
0 * * * *Every hour, on the hour
0 */6 * * *Every 6 hours — 00:00, 06:00, 12:00, 18:00
30 2 * * *Every day at 02:30
0 9 * * 1-5At 09:00, Monday to Friday
0 0 * * 0Every Sunday at midnight
0 0 1 * *First day of every month at midnight
0 0 L * *Last day of the month — only in Quartz, not standard cron
0 0 1 1 *Once a year, 1 January at midnight
*/15 9-17 * * 1-5Every 15 minutes during office hours on weekdays
0 4 * * 6Saturdays at 04:00 — a good slot for heavy jobs

Note that L, W, # and the optional seconds field belong to Quartz and Spring, not to the standard Unix cron used by Linux and macOS. This generator produces standard five-field expressions that work with vixie-cron and cronie.

Cron expression FAQs

What does the cron expression * * * * * mean?

Five asterisks mean every minute of every hour of every day. The fields are minute, hour, day of month, month and day of week, and an asterisk means “any value”, so nothing constrains the schedule and the job fires sixty times an hour.

How do I run a cron job every 5 minutes?

Use */5 * * * *. The step operator divides the minute field, so the job runs at 0, 5, 10 and so on past every hour. Steps only produce even spacing when the number divides 60 evenly, which is why 5, 10, 15, 20 and 30 behave predictably and 7 or 40 do not.

What is the difference between day of month and day of week?

Day of month is the calendar date, 1 to 31. Day of week is 0 to 6 with Sunday as 0, and 7 is also accepted for Sunday on most systems. The critical detail is that if both fields are restricted, cron runs the job when either one matches, not when both do.

Does cron use UTC or local time?

Cron uses the system timezone of the machine it runs on, which is UTC by default on most cloud servers and containers. Check it with timedatectl or date. Some cron implementations let you set CRON_TZ=Europe/London at the top of the crontab to override it for the entries that follow.

Why is my cron job not running?

The usual causes are a relative path that cron cannot resolve because it has a minimal environment, a script that is not executable, an unescaped percent sign, a missing final newline at the end of the crontab file, or the schedule simply firing at a different time than you expected. Redirect output to a log file with >> /path/to.log 2>&1 and check it.

How do I run a job on the last day of the month?

Standard Unix cron has no last-day operator, so L will not work. The usual approach is to run daily and let the script decide, for example 0 0 28-31 * * combined with a check that tomorrow is the first of the next month. Quartz-based schedulers in Java do support L directly.

What does @reboot do?

@reboot runs the command once when cron starts, which is normally at system boot. It is a convenient way to launch a long-running process, but it is not a substitute for a proper service unit — systemd will restart a failed service, cron will not.

Can cron run a job every 30 seconds?

Not directly, because the smallest unit standard cron understands is one minute. The common workaround is two entries a minute apart, one running the command immediately and the other prefixed with sleep 30 &&. For anything genuinely sub-minute, a systemd timer or a supervised long-running process is the better tool.

Check the schedule before you trust it

Build the expression, read it in plain English, and confirm the next eight run times in both local time and UTC.

Open the generator

Scroll to Top