Cron Expression Generator
Runs every minute
What Is a Cron Expression?
A cron expression is a compact string that tells the cron scheduler exactly when to run a task. The standard format used by Unix and Linux systems has five fields separated by spaces: minute, hour, day of month, month, and day of week. Each field accepts a value or a pattern, and a task runs whenever the current time matches every field. Cron has been the backbone of scheduled automation for decades, driving everything from nightly backups to log rotation and report generation.
A standard five-field cron expression is laid out like this:
┌───────────── minute (0–59)
│ ┌───────────── hour (0–23)
│ │ ┌───────────── day of month (1–31)
│ │ │ ┌───────────── month (1–12)
│ │ │ │ ┌───────────── day of week (0–6, Sun=0)
│ │ │ │ │
* * * * *
The fields combine with a small set of special characters: * matches any value, , separates a list (for example 1,15 for the 1st and 15th), - defines a range (such as 1-5 for Monday through Friday), and / sets a step (such as */5 for every 5 units). Together these let you describe almost any recurring schedule in a single line.
How to Use This Cron Expression Generator
For each of the five fields — Minute, Hour, Day of Month, Month, and Day of Week — choose a mode from its dropdown: every value, specific value(s), a range, or (where applicable) every N units. When you pick "specific," checkboxes appear so you can select individual values; "range" gives you From and To selectors; and "step" gives you a number input for the interval. The generated expression updates live in the read-only output field as you make changes.
Below the expression you get a plain-English description of the schedule (for example, "Runs every 5 minutes") and a list of the Next 5 Runs computed in your browser's local time. Use the Common Presets buttons — such as Every 5 min, Daily midnight, Weekly (Sunday), or Weekdays 9–5 — to load a ready-made schedule and tweak it from there, and press Copy to put the finished expression on your clipboard.
Real-World Use Cases
- Database and file backups — Schedule a nightly or weekly job such as
0 2 * * *to back up at 2 AM. - Log rotation and cleanup — Run maintenance scripts during off-peak hours to free disk space.
- Report generation — Email a summary every weekday morning with a schedule like
0 8 * * 1-5. - Cache warming and polling — Hit an endpoint every few minutes using a step expression like
*/15 * * * *. - CI/CD and container schedules — Provide the expression to tools and platforms that accept standard cron syntax for periodic jobs.
Tips for Writing Cron Schedules
- Remember that day-of-month and day-of-week are OR'd together in most cron implementations, so set only one if you mean a single condition.
- Use steps like
*/10for "every 10 minutes" instead of listing each value — it is shorter and clearer. - Check the Next 5 Runs preview before deploying; it is the fastest way to catch a schedule that fires more or less often than you intended.
- Sunday can be written as
0in the standard five-field format, which is what this generator uses. - Cron resolution is one minute — there is no seconds field in the standard format, so the shortest interval is every minute.
Features
- Visual field builder — Configure minute, hour, day of month, month, and day of week with every, specific, range, and step modes.
- Plain-English summary — See a human-readable description of exactly when the expression runs.
- Next 5 runs preview — The tool calculates the upcoming run times in your local time zone.
- Common presets — One-click templates for everyday schedules like hourly, daily, weekly, and weekdays 9–5.
- Copy to clipboard — Grab the finished five-field expression with a single click.
- 100% client-side — your data never leaves your browser.
Frequently Asked Questions
What is a cron job?
A cron job is a scheduled task on Unix and Linux systems. The cron daemon reads crontab files and runs the associated commands automatically whenever the current time matches the schedule defined by a cron expression, making it the standard way to automate recurring work.
What do the five fields in a cron expression mean?
From left to right, the five fields are minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, with Sunday as 0). A task runs when the current time matches every field, and an asterisk in a field means "any value."
How do I install a cron job?
Run crontab -e in your terminal to edit your user's crontab, then add a line consisting of the cron expression followed by the command, for example 0 0 * * * /path/to/script.sh. Save and exit, and the cron daemon will pick up the new schedule.
How are the next run times calculated?
The tool scans forward minute by minute from the current time, testing each minute against your expression's five fields until it finds five matches. The results are shown in your browser's local time zone, and the scan covers up to one year ahead.
What is the difference between a range and a step?
A range like 1-5 matches every value from the start to the end inclusive, while a step like */5 matches every fifth value starting from the field's minimum. You can combine them with lists using commas to build more complex schedules.
Is this cron generator free and private?
Yes. The generator is free and runs entirely in your browser using client-side JavaScript. Nothing you build is sent to any server, so your schedules and any related data stay completely private on your own device.