Free tool · Runs in your browser

Cron Expression Generator

Build and decode cron schedules with a live plain-English description and the next run times. Use the visual builder or type an expression - then turn it into a ready crontab line.

minute hour day(month) month day(week)

Every 5 minutes.

Next runs

Calculating...

Times shown in UTC. Cron uses the server's timezone - set CRON_TZ or match the server to avoid surprises.

Presets
Build it field by field
Minute*/5
Everyminutes
Hour*

Matches every value (0 to 23).

Day of month*

Matches every value (1 to 31).

Month*

Matches every value (1 to 12).

Day of week*

Matches every value (0 to 6).

Turn it into a crontab line
Use absolute paths - cron runs with a minimal PATH
crontab line
*/5 * * * * /path/to/command
with logging (recommended)
*/5 * * * * /path/to/command >> /var/log/cron.log 2>&1

Install it with crontab -e, paste the line, then save. Redirecting output to a log file makes failures debuggable.

How a cron expression works

A standard cron expression has five space-separated fields. Each field accepts a value, and together they define when a job runs:

* * * * *
| | | | |
| | | | +-- day of week  (0-7, Sun=0 or 7)
| | | +---- month        (1-12 or JAN-DEC)
| | +------ day of month (1-31)
| +-------- hour         (0-23)
+---------- minute       (0-59)
FieldAllowed valuesSpecial chars
minute0-59* , - /
hour0-23* , - /
day of month1-31* , - /
month1-12 or JAN-DEC* , - /
day of week0-7 or SUN-SAT* , - /

An optional sixth field at the front adds seconds - this is supported by schedulers like node-cron and Quartz, but not by standard system cron.

Special characters

CharMeaningExample
*Every value in the field* * * * * = every minute
, A list of specific values0 9,17 * * * = 9 AM and 5 PM
-An inclusive range0 9-17 * * * = every hour 9 AM-5 PM
/Step (every N)*/10 * * * * = every 10 minutes

The characters ?, L, W, and # are Quartz-only (used by Java schedulers) and are not valid in real Unix cron - avoid them unless your scheduler is Quartz.

Shortcut strings (@daily and friends)

Most cron implementations accept these convenient nicknames:

NicknameEquivalentMeaning
@yearly / @annually0 0 1 1 *Once a year (Jan 1)
@monthly0 0 1 * *First of every month
@weekly0 0 * * 0Every Sunday at midnight
@daily / @midnight0 0 * * *Every day at midnight
@hourly0 * * * *Every hour
@reboot-Once, at system startup

The day-of-month vs day-of-week gotcha

This trips up almost everyone. When both the day-of-month and day-of-week fields are restricted (neither is *), cron runs the job when either one matches - an OR, not an AND.

So 0 0 13 * 5 runs at midnight on the 13th of any month and every Friday - not only on Friday the 13th. To target a specific weekday in a specific month, keep day-of-month as *.

Editing your crontab

CommandWhat it does
crontab -eEdit your user crontab
crontab -lList your current cron jobs
crontab -rRemove your crontab (careful - no prompt)

Each user has their own crontab (stored under /var/spool/cron). System-wide jobs live in /etc/crontab and /etc/cron.d/ - those add an extra user field between the schedule and the command. Drop-in scripts also go in /etc/cron.daily, /etc/cron.hourly, and so on.

Common cron mistakes (and fixes)

  • Minimal PATH. Cron does not load your shell profile, so node or python may not be found. Use absolute paths (/usr/bin/node) or set PATH at the top of the crontab.
  • No output, no clue. Redirect output to a log: ... >> /var/log/job.log 2>&1. Otherwise failures vanish (or get mailed).
  • Unescaped %. A literal percent sign must be escaped as \% in crontab - unescaped, it is treated as a newline.
  • MAILTO. Set MAILTO=you@example.com to receive job output by email, or MAILTO="" to silence it.
  • Timezone. Cron uses the server's timezone. Set CRON_TZ=UTC at the top of the crontab to pin it, and remember DST can shift local schedules.

Debugging and alternatives

To see whether a job fired, check the cron log - grep CRON /var/log/syslog on Debian/Ubuntu, or journalctl -u cronwith systemd. Then run the exact command by hand to confirm it works outside cron's minimal environment.

For anything beyond simple scheduling - dependencies, retries, accurate logging, missed-run catch-up - modern Linux systems often prefer systemd timers, which integrate with the journal and service management. Cron remains the simplest choice for straightforward, recurring tasks.

Common cron expressions

ExpressionRuns
* * * * *Every minute
*/5 * * * *Every 5 minutes
*/15 * * * *Every 15 minutes
0 * * * *Every hour, on the hour
0 0 * * *Every day at midnight
0 9 * * *Every day at 9:00 AM
0 9 * * 1-5Weekdays (Mon-Fri) at 9:00 AM
0 0 * * 0Every Sunday at midnight
0 0 1 * *First day of every month at midnight
0 0 1 1 *Once a year, on January 1st
30 2 * * 6Every Saturday at 2:30 AM
0 */6 * * *Every 6 hours
0 8-17 * * 1-5Every hour, 8 AM-5 PM, on weekdays
Cron FAQ

Frequently asked questions

It runs every 5 minutes. The */5 in the minute field means "every 5th minute" (0, 5, 10, ... 55), and the four asterisks mean every hour, every day of the month, every month, and every day of the week.
Use a step value with /. Every 10 minutes is */10 * * * *; every 2 hours is 0 */2 * * *. The step applies to the field it is in, so put it in the minute field for minutes and the hour field for hours.
Because cron treats them as OR when both are set: the job runs whenever either field matches. For example 0 0 13 * 5 runs on the 13th of every month AND every Friday. To target a weekday within a month, leave day-of-month as *.
Use 1-5 in the day-of-week field, e.g. 0 9 * * 1-5 runs at 9 AM Monday through Friday. Day-of-week is 0-7 where both 0 and 7 are Sunday, so Monday is 1 and Friday is 5.
The usual causes are: cron has a minimal PATH so binaries are not found (use absolute paths), the command produced an error you never saw (redirect output to a log with >> file 2>&1), the script is not executable, or the timezone differs from what you expected. Check the cron log with grep CRON /var/log/syslog.
@reboot runs a command once each time the system boots, rather than on a time schedule. It is handy for starting a process or warming a cache at startup. Note it does not run when cron itself restarts - only on a full system boot.
By default, the system/server timezone. You can pin a crontab to a specific zone by setting CRON_TZ at the top of the file (for example CRON_TZ=UTC). The next-run preview in this tool lets you pick a timezone so you can see times in whatever zone your server uses.
Scheduling across a fleet?

Automate every server from one place.

CtrlOps runs automated backups and scheduled tasks across all your servers, with an AI terminal that writes the command for you and approve-before-run safety - your credentials encrypted on your own machine.

Start instantly· No credit card· No sneaky autorenewals