Cron explainer
Paste the line from crontab and find out when it actually runs. Before it runs at 3 a.m. on the wrong day.
Runs in your browser. Nothing you paste or drop here is uploaded anywhere.
Five fields, a @shortcut, or a whole crontab line with the command.
- 0Minute:000–59
- 3Hour03:xx0–23
- *Day of monthany day1–31
- *Monthevery month1–12, JAN–DEC
- 1-5Day of weekMon–Fri0–7, SUN–SAT
At 03:00, Monday through Friday.
Servers often run cron in UTC. Check with date or timedatectl on the server.
How to use it
- Paste a crontab line into the box: five fields, a shortcut like
@daily, or the whole line with the command. - Read the sentence. Put the cursor on a field to highlight it in the breakdown.
- Check the warnings. They catch the classic mistakes:
*in the minute field, day 31, and the day-of-month/day-of-week OR rule. - Look at the next 10 runs. Switch to UTC if your server runs in UTC, which most do.
What it does
Cron reads five fields left to right: minute, hour, day of month, month, day of week. 0 3 * * 1-5 means 03:00, Monday to Friday. Each field takes numbers, ranges (1-5), lists (1,15), steps (*/15) and, for months and weekdays, names like JAN and MON. Sunday is both 0 and 7.
The tool follows Vixie cron and cronie, the crons on most Linux servers. It also recognises six-field expressions with seconds (node-cron, Quartz, Spring) and the Quartz-only ? L W #, and says when a line won’t work in a plain crontab.
Next runs are calculated in your browser, in your timezone or in UTC. Daylight saving is handled the way your browser sees it: a time that falls into the spring-forward gap moves to the first minute after it and gets marked. Real crons differ here, so avoid scheduling between 02:00 and 03:00 if your server keeps local time.
Most cron jobs on small sites are boring and important: renewing certificates with certbot, backups before moving a cPanel account, and running WordPress tasks with a real cron instead of WP-Cron, as in the WordPress security checklist. Broken cron doesn’t throw errors. It just stops doing things.
Questions
What does */5 mean in cron?
*/5 means every 5th value, starting from the lowest. In the minute field that is :00, :05, :10 and so on: every 5 minutes. The step restarts every hour, so steps that don’t divide 60 (like */7) leave a short gap at the top of the hour. 10-30/5 limits the same step to minutes 10 to 30.
Why did my cron job run on the wrong day?
Probably the day-of-month/day-of-week rule. If both fields are set, cron runs when either one matches. 0 0 1 * 1 runs on the 1st and on every Monday, not only on a Monday that is the 1st. A field that starts with *, like */2, counts as unset and flips the rule to “both must match”. For “the first Monday”, put 1-7 in day of month, * in day of week, and check the weekday in the command.
What timezone does cron use?
The server’s system timezone, unless your cron supports CRON_TZ (cronie does) or the job sets TZ itself. Many servers run in UTC, so 0 3 * * * may fire at 06:00 your time. Run date or timedatectl on the server to check, and use the UTC switch above.
Why does my command work in the terminal but not in cron?
Cron runs it with a tiny environment: a short PATH, no aliases, often a different shell, and % means newline. Use full paths like /usr/bin/php, escape % as \%, and send the output to a log (>> /tmp/job.log 2>&1) so you can see what went wrong.
How do I see and edit my cron jobs?
crontab -l lists your jobs and crontab -e opens them in an editor. Every user has their own crontab, so a job added as root won’t show up under your user: sudo crontab -l shows root’s. System jobs also live in /etc/crontab and /etc/cron.d/, and those lines have an extra field between the schedule and the command: the user to run it as. On shared hosting without a shell, look for Cron Jobs in cPanel.