Toolsky

Free Online Tools & Utilities for Every Task.

Cron Expression Generator

Easily build and understand cron job schedules with a human-readable description and cheatsheet.

Common Presets

0-59
0-23
1-31
1-12
0-6 (Sun-Sat)
Cron Syntax Cheatsheet
*Any value (wildcard)
,List separator (e.g. 1,3,5)
-Range of values (e.g. 1-5)
/Step values (e.g. */15)
  • Minute: 0-59
  • Hour: 0-23
  • Day: 1-31
  • Month: 1-12 (or JAN-DEC)
  • Weekday: 0-6 (or SUN-SAT)

Five little fields — minute, hour, day, month, weekday — decide when millions of servers wake up to run backups, send reports and clear caches. Cron is powerful, but its expressions are famously easy to get subtly wrong: one misplaced asterisk and a job runs every minute instead of every month. A cron expression generator builds the schedule visually and translates it back into plain language, so you can be sure the expression says what you meant.

Cron in a Nutshell

Cron is the built-in time-based scheduler on Unix and Linux systems. Each line in its configuration table, the crontab, pairs a schedule with a command. The schedule is written as five space-separated fields: minute (0–59), hour (0–23), day of the month (1–31), month (1–12) and day of the week (0–7, where both 0 and 7 mean Sunday). An asterisk means "every" for that field, commas list several values, hyphens set a range, and a slash steps through values — so */15 in the minute field means every fifteen minutes. The full formal definition lives in the crontab(5) manual page.

The format is compact because it was designed for terse system files, not for human reading at a glance. That gap between compact and clear is precisely the gap a generator bridges.

What This Generator Helps You Build

  • Schedules from choices, not memory — pick the pattern (daily, weekly, every few hours, a custom interval) and let the expression assemble itself.
  • A human-readable translation — see your expression described in ordinary words, so "0 3 * * 0" becomes a sentence you can sanity-check before it goes live.
  • Special-character help — a cheatsheet for *, /, – and , so you can read and modify expressions you inherit from other people's servers.
  • Faster experimentation — adjust a field, watch the expression and the description update, and learn the syntax by playing rather than by breaking a production job.

Schedules are usually about moments in time, so you may also need the timestamp converter when comparing cron times with log entries, and the SSH config generator when the jobs you schedule run on servers you connect to remotely.

How to Build a Cron Expression

  1. Decide how often the job should run — every few minutes, hourly, daily, weekly, monthly, or a custom pattern.
  2. Set the time fields: the minute and hour at which it should start, and the days it applies to.
  3. Choose ranges or steps where needed, such as weekdays only, or every two hours.
  4. Read the generated expression and, most importantly, the human-readable description beneath it.
  5. Check the description against your intention — especially the day fields, where most mistakes happen.
  6. Copy the expression into your crontab or scheduler configuration next to the command it should trigger.

Reading Real Expressions: Three Examples Decoded

0 3 * * 0 runs at 03:00 every Sunday: minute 0, hour 3, any day of the month, any month, weekday 0. That is a classic slot for a weekly maintenance script. */15 * * * * runs every fifteen minutes, around the clock — the pattern behind health checks and queue workers. 30 8 1 * * runs at 08:30 on the first day of every month, a typical billing-report schedule. Notice how each example pins down the fields it cares about and leaves the rest as asterisks; the discipline of cron writing is deciding which fields those are.

In practice, developers generating schedules for application backups, DevOps engineers standardising job times across a fleet, and system administrators inheriting a crontab full of mysterious lines all lean on the same habit: generate or decode the expression, read the plain-language result out loud, and only then let it anywhere near a live server. A schedule that sounds right in words almost always is right; a schedule you merely recognise as looking familiar is where outages hide.

Common Cron Mistakes and How to Dodge Them

The classic trap is the pair of day fields. Day of the month and day of the week combine in a way that surprises newcomers: if both are restricted, cron runs the job when either matches on most systems, not only when both do. So "0 9 1 * 1" does not mean "09:00 on Mondays that fall on the 1st" — it means 09:00 on every 1st of the month and every Monday. The fix for a strict "and" is usually to leave one field as an asterisk or handle the second condition inside the script.

Other repeat offenders: forgetting that hours are 24-hour (3 means 03:00, not 15:00); assuming cron knows your timezone, when it follows the server's clock, which may be UTC; percent signs in commands, which cron treats specially in a crontab line; and jobs that silently fail because cron's environment is minimal — no friendly PATH, no shell profile. Generate the schedule here, then test the command itself under cron-like conditions before blaming the timing. Expression generators remove syntax risk; they cannot remove environment risk, and knowing which is which saves hours.

Frequently Asked Questions About Cron Expressions

What do the five fields in a cron expression mean?

In order: minute, hour, day of the month, month and day of the week. For example, 30 14 * * * means every day at 14:30.

What does */5 in the minute field do?

The slash sets a step. */5 in the minute field runs the job every five minutes: at minutes 0, 5, 10 and so on through the hour.

How do I schedule a job for weekdays only?

Set the day-of-week field to 1-5, which covers Monday to Friday. For example, 0 9 * * 1-5 runs at 09:00 on weekdays.

Why did my job run on both the 1st and every Monday?

When both day fields are restricted, standard cron triggers when either condition matches. It is an "or", not an "and" — a well-known cron behaviour that surprises many first-time users.

Does cron use my local time or the server's time?

Cron follows the clock of the machine it runs on, which for servers is often UTC. Always check the server's timezone before assuming a 9 a.m. job means your 9 a.m.

Can cron run a job every second?

No. The smallest unit in a standard cron expression is one minute. Finer intervals need a different mechanism, such as a loop inside a script started once by cron.

What is the difference between the system crontab and a user crontab?

The system-wide file includes an extra field naming the user the command runs as. User crontabs omit it because the owner is implied. The five schedule fields are identical in both.

How can I check when an expression will actually run?

Read the generated human-readable description carefully, then mentally step through the next few matches — next hour, next day, next week — to confirm they land where you expect.

Schedules You Can Read at a Glance

Cron rewards those who double-check. The generator's real gift is not the expression itself but the translation: five cryptic fields turned into a sentence anyone on the team can verify. Build the schedule, read the sentence, and let the server do the rest — at exactly the times you intended.