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.
Calculating...
Times shown in UTC. Cron uses the server's timezone - set CRON_TZ or match the server to avoid surprises.
Matches every value (0 to 23).
Matches every value (1 to 31).
Matches every value (1 to 12).
Matches every value (0 to 6).
*/5 * * * * /path/to/command*/5 * * * * /path/to/command >> /var/log/cron.log 2>&1Install 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)
| Field | Allowed values | Special chars |
|---|---|---|
| minute | 0-59 | * , - / |
| hour | 0-23 | * , - / |
| day of month | 1-31 | * , - / |
| month | 1-12 or JAN-DEC | * , - / |
| day of week | 0-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
| Char | Meaning | Example |
|---|---|---|
| * | Every value in the field | * * * * * = every minute |
| , | A list of specific values | 0 9,17 * * * = 9 AM and 5 PM |
| - | An inclusive range | 0 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:
| Nickname | Equivalent | Meaning |
|---|---|---|
| @yearly / @annually | 0 0 1 1 * | Once a year (Jan 1) |
| @monthly | 0 0 1 * * | First of every month |
| @weekly | 0 0 * * 0 | Every Sunday at midnight |
| @daily / @midnight | 0 0 * * * | Every day at midnight |
| @hourly | 0 * * * * | 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
| Command | What it does |
|---|---|
| crontab -e | Edit your user crontab |
| crontab -l | List your current cron jobs |
| crontab -r | Remove 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
nodeorpythonmay not be found. Use absolute paths (/usr/bin/node) or setPATHat 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. SetMAILTO=you@example.comto receive job output by email, orMAILTO=""to silence it.- Timezone. Cron uses the server's timezone. Set
CRON_TZ=UTCat 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
| Expression | Runs |
|---|---|
| * * * * * | 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-5 | Weekdays (Mon-Fri) at 9:00 AM |
| 0 0 * * 0 | Every 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 * * 6 | Every Saturday at 2:30 AM |
| 0 */6 * * * | Every 6 hours |
| 0 8-17 * * 1-5 | Every hour, 8 AM-5 PM, on weekdays |
Frequently asked questions
Related developer tools
Nginx Config Generator
Generate an nginx server block for a reverse proxy, static site, SPA, or PHP - with SSL.
Base64 Encoder / Decoder
Encode and decode Base64 - text, files, and data URIs - with URL-safe and UTF-8 support.
curl Command Builder
Assemble curl requests with headers, methods, auth, and data from a form.
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

