Cron expression generator & explainer
Cron Expression Generator
Free, no sign-up. We only fetch the public URL you enter.
Short answer
Enter a five-field cron expression (minute, hour, day of month, month, day of week) such as 30 2 * * 1-5, or a macro such as @daily. The tool explains the schedule in plain English (“at 02:30, Monday to Friday”), breaks down each field and lists the next five run times in UTC. Use */n for “every n”, commas for lists and hyphens for ranges. monitordefend does not monitor cron jobs; it watches websites, so it notices when a failed job takes your site down.
- Standard five-field crontab syntax and @-macros.
- Plain-English explanation and field-by-field breakdown.
- Next five run times in UTC to verify the schedule.
“At 02:30, Monday through Friday” Minute 30 at minute 30 Hour 2 at 2 a.m. Day (month) * every day of the month Month * every month Day (week) 1-5 Monday to Friday Next runs Mon 02:30 · Tue 02:30 · Wed 02:30 … (UTC)
Cron syntax is compact, powerful and easy to get wrong: one misplaced asterisk and a nightly backup runs every minute, or never. This free cron expression generator takes a standard five-field expression such as */15 * * * * or a macro such as @daily and explains it back to you — in plain English, field by field, and with the next five run times so you can see the schedule before you put it into a crontab. Below the tool you will find the complete syntax, the operators, ready-made examples and the most common reasons a cron job does not run.
How to use the cron expression generator
Type or paste an expression into the field above. The tool accepts the standard five-field syntax used by cron on Linux and Unix systems, by most hosting control panels and by many cloud and CI schedulers, as well as the @-macros such as @hourly, @daily, @weekly, @monthly and @yearly.
The result has three parts. The plain-English sentence tells you what the schedule means as a whole. The breakdown lists each of the five fields with its value and a short explanation, so you can spot which part does not match your intention. The list of the next five run times, shown in UTC, is the final check: if the job you meant to run every weekday shows a Saturday, the expression is wrong.
- Plain-English explanation of the full schedule
- Field breakdown: minute, hour, day of month, month, day of week
- Next five run times in UTC
- Macros such as @daily are expanded to their five-field equivalent
What is a cron expression?
Cron is the time-based job scheduler of Unix-like operating systems. A daemon wakes up every minute, reads the schedule tables — the crontabs — and starts every command whose schedule matches the current time. A cron expression is the schedule part of such a line: five fields separated by spaces that describe on which minutes, hours, days and months a command should run.
- Minute 0–59
- Hour 0–23
- Day of month 1–31
- Month 1–12 or JAN–DEC
- Day of week 0–6 or SUN–SAT
Cron expressions are used far beyond the classic server crontab. Backups, log rotation, report generation, cache warming, data syncs, newsletter sends, certificate renewals and cleanup tasks are all typically scheduled this way, and the same syntax appears in container orchestration, CI pipelines, serverless schedulers and hosting panels.
The five fields of a cron expression
Read a cron expression from left to right. Each field restricts when the job may run, and the job runs whenever all fields match the current time.
| Field | Allowed values | Example | Meaning of the example |
|---|---|---|---|
| Minute | 0–59 | 30 | 30 minutes past the hour |
| Hour | 0–23 | 2 | 2 a.m. (24-hour format) |
| Day of month | 1–31 | 15 | The 15th of the month |
| Month | 1–12 or JAN–DEC | 1 | January |
| Day of week | 0–7 or SUN–SAT | 1-5 | Monday to Friday (0 and 7 are Sunday) |
Cron operators
Four operators make up almost every schedule. The asterisk means any value, the comma separates a list, the hyphen defines a range and the slash defines a step. They can be combined within one field, for example 0-30/10 for minutes 0, 10, 20 and 30.
* * * * * every minute */5 * * * * every 5 minutes 0 * * * * every hour, on the hour 0 0 * * * every day at midnight 0 9 * * 1-5 weekdays at 09:00 0 0 1 * * first day of every month
| Operator | Meaning | Example | Result |
|---|---|---|---|
| * | Any value (wildcard) | * in the minute field | Every minute |
| , | List of values | 1,15 in day of month | On the 1st and the 15th |
| - | Range of values | 1-5 in day of week | Monday to Friday |
| / | Step values | */15 in the minute field | Every 15 minutes |
| MON–SUN | Day name abbreviations | MON | Monday |
| JAN–DEC | Month name abbreviations | JAN | January |
Common cron examples
These are the schedules needed most often. Paste any of them into the tool to see the explanation and the next run times.
| Schedule | Expression |
|---|---|
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every 30 minutes | */30 * * * * |
| Every hour | 0 * * * * |
| Every 2 hours | 0 */2 * * * |
| Every day at midnight | 0 0 * * * |
| Every day at 02:30 | 30 2 * * * |
| Weekdays at 09:00 | 0 9 * * 1-5 |
| Every Sunday at 03:00 | 0 3 * * 0 |
| First day of the month at 00:00 | 0 0 1 * * |
| Twice a day, 08:00 and 20:00 | 0 8,20 * * * |
| Every 15 minutes during office hours | */15 9-17 * * 1-5 |
| Once a year on 1 January | 0 0 1 1 * |
Special strings (macros)
Most cron implementations accept a few shorthand strings in place of the five fields. They are easier to read but cannot express anything the five fields cannot.
| String | Meaning | Equivalent |
|---|---|---|
| @yearly / @annually | Once a year at midnight on 1 January | 0 0 1 1 * |
| @monthly | Once a month at midnight on the 1st | 0 0 1 * * |
| @weekly | Once a week at midnight on Sunday | 0 0 * * 0 |
| @daily / @midnight | Once a day at midnight | 0 0 * * * |
| @hourly | Once an hour at minute 0 | 0 * * * * |
| @reboot | Once when the cron daemon starts | No time schedule, so no run times |
How to run a job every X minutes
Use the step operator in the minute field. */5 * * * * runs every five minutes, */10 every ten, */15 every fifteen. The same works in other fields: 0 */2 * * * runs at minute 0 of every second hour, 0 0 */3 * * on every third day of the month.
Steps count from the start of the field’s range, not from the moment you saved the crontab. */7 in the minute field runs at minutes 0, 7, 14 … 49 and 56, and then again at 0 of the next hour, so the gap between 56 and 0 is only four minutes. If you need an exact interval that does not divide 60, cron is the wrong tool; use a loop with sleep or a scheduler that supports intervals.
Day of month and day of week together
One rule surprises almost everyone. When both day fields are restricted — neither is an asterisk — classic cron runs the job when either of them matches, not when both match. 0 0 13 * 5 therefore runs on every 13th of the month and on every Friday, not only on Friday the 13th.
- Run 1
- Run 2
- Run 3
- Run 4
- Run 5
To run on, say, the first Monday of a month, restrict one field in the expression and check the other in the command, for example 0 9 1-7 * * with a test for the weekday at the start of the script. The run preview of the tool makes this behaviour visible immediately.
Where to paste the expression
The expression only defines when something runs. To make it do something, combine it with a command in a crontab:
- Open a terminal on the server and run crontab -e to edit your user’s crontab
- Add a new line: the expression, a space, then the full path to the command or script
- Example: 30 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1
- Save and close the editor; cron picks up the change automatically
- List the active entries with crontab -l to confirm the line was saved
Five-field cron versus six-field Quartz expressions
The five-field format is the Unix standard and what this tool explains. Some schedulers extend it. Quartz and other Java-based schedulers use six or seven fields, adding seconds at the beginning and optionally a year at the end, and support extra characters: ? for “no specific value”, L for the last day, W for the nearest weekday and # for the nth weekday of the month, such as MON#3 for the third Monday.
These extensions are not part of standard cron, and a crontab will reject or misread them. If your platform expects the Quartz format, prepend a seconds value to a five-field expression — 0 30 2 * * ? corresponds to 30 2 * * * — and check its documentation for how it treats the day fields.
Time zones and run times
Cron runs in the time zone of the system it runs on, and many servers and containers are set to UTC. The tool shows the next run times in UTC for exactly this reason: if your server uses UTC and you meant 02:30 local time in Berlin, the job will run an hour or two off, depending on daylight saving time.
Daylight saving time causes a second class of surprises: on the night the clocks change, a job scheduled in the skipped hour may not run at all, and one in the repeated hour may run twice, depending on the implementation. Schedule critical jobs outside 01:00–03:00 local time or run the server in UTC.
My cron job is not running: common mistakes
A cron job that works in the terminal but not from cron almost always fails because cron runs with a minimal environment. Check these points first.
- Use absolute paths for every command and file; PATH in cron is minimal
- Make the script executable: chmod +x /path/to/script.sh
- Check that the job runs as the user who owns the files it needs
- Escape % characters in the command line; cron treats them as newlines
- Redirect output to a log file instead of discarding it, so errors are visible
- Make sure the last line of the crontab ends with a newline
How to check whether a cron job actually ran
The cron daemon logs every job it starts. On Debian and Ubuntu, run grep CRON /var/log/syslog, or journalctl -u cron on systems with systemd. On CentOS, RHEL and related distributions, look in /var/log/cron. The log tells you that the command was started, not whether it succeeded.
For the result, let the job write its own log with a timestamp and exit status, or redirect its output to a file. A logged start without a matching success line is the clearest sign of a failure. For jobs that matter, a dedicated heartbeat monitor that expects a ping after every successful run will tell you when a run is missing; the cron job monitoring guide explains how that works and which tools offer it.
Cron jobs and monitordefend
monitordefend does not monitor cron jobs or heartbeats. It monitors websites: uptime every five minutes, response time, broken links and more, with email alerts. If a failed scheduled task — a full disk after a broken log rotation, an expired certificate after a failed renewal — takes your site down, the uptime check notices. Plans start with a 7-day free trial.
Frequently asked questions
What does * * * * * mean?
Five asterisks match every value in every field, so the job runs every minute of every hour of every day.
How do I run a cron job every 5 minutes?
Use */5 * * * *. The step operator */5 in the minute field matches minutes 0, 5, 10 and so on up to 55.
What is the cron expression for every day at midnight?
0 0 * * *, or the macro @daily. Both run once a day at 00:00 in the time zone of the server.
Is Sunday 0 or 7 in cron?
Both. Standard cron accepts 0 and 7 for Sunday in the day-of-week field; 1 is Monday.
Why are the run times shown in UTC?
Many servers run in UTC, and showing a fixed time zone avoids confusion. Convert to your server’s time zone if it is set to local time.
Can this tool generate Quartz expressions?
It explains the standard five-field format and the @-macros. For Quartz, prepend a seconds field and check your scheduler’s rules for ? and the day fields.