The log line read CRON[12347]: (root) CMD (echo "disk at 90), and the job had been written as echo "disk at 90%" > /tmp/crontest/pct-broken.out 2>&1. Cron did not crash, did not warn, and did not create the output file. It cut the command at the percent sign, fed the rest to the job as standard input, and moved on to the next minute like a building super who has stopped answering the buzzer.
Every example in this post was checked two ways. Schedules were run through the Python parser croniter (version 7.0.0) to list the next real firing times, and the traps were installed as live crontab entries on an Ubuntu 24.04 test container running Debian’s cron package (3.0pl1-184ubuntu2), with the daemon started by hand. Output is pasted as it came back, minus timestamps.
The five fields, read left to right
Minute, hour, day of month, month, day of week, then the command
A crontab line is five time fields and a command. The order is minute (0–59), hour (0–23), day of month (1–31), month (1–12) and day of week (0–7, where both 0 and 7 mean Sunday), as laid out in the Debian crontab(5) manual. An asterisk means “every value.” Commas make lists, hyphens make ranges, and a slash adds a step.
Install and inspect jobs with the crontab command rather than editing files under /var/spool. crontab -e opens the table in the editor named by the VISUAL or EDITOR variable, and crontab -l prints it, per the crontab(1) page. The same page lists -r, which removes the whole table. On a keyboard, r sits right next to e.
The parser turned the common requests into concrete times, starting from 08:58 on Thursday, November 19, 2026:
*/5 * * * * | Every 5 minutes
Thu 09:00, 09:05, 09:10, 09:15, 09:20
0 9 * * 1-5 | At 09:00, Monday through Friday
Thu 11-19, Fri 11-20, Mon 11-23, Tue 11-24, Wed 11-25
30 2 * * 0 | At 02:30, only on Sunday
Sun 11-22, Sun 11-29, Sun 12-06, Sun 12-13, Sun 12-20
0 */6 * * * | Every 6 hours
Thu 12:00, Thu 18:00, Fri 00:00, Fri 06:00, Fri 12:00
The English descriptions came from the cron-descriptor package and the times from croniter. Note the second line: Thursday to Friday, then a jump straight to Monday. The weekend is skipped because 1-5 is Monday through Friday, which is the entire reason anyone types it.

Every 5 minutes, and why every 7 is a different animal
A step value restarts at the top of each hour, not at the last run
*/5 in the minute field means every minute from 0 to 59 that divides evenly by five. It does not mean “five minutes after the previous run.” The distinction is invisible for 5, 10, 15, 20 and 30, because 60 divides cleanly by each of them. It shows up the moment someone picks a number that does not.
croniter listed ten runs of */7 * * * * starting at 09:00:
*/7 * * * * -> 09:00 09:07 09:14 09:21 09:28 09:35 09:42 09:49 09:56 10:00
gaps (minutes): [7, 7, 7, 7, 7, 7, 7, 7, 4]
Eight gaps of seven minutes, then a four-minute gap as the counter hits the hour and starts over at zero. The Ubuntu crontab(5) page makes the same point with hours: steps apply only within their own field, so */23 in the hours field fires at hour 0 and hour 23, a one-hour gap followed by a twenty-three-hour gap. Anyone who needs a true seven-minute interval needs a loop with sleep, a systemd timer, or a different tool. Cron counts on a clock face, and a clock face has sixty marks.
Weekdays, weekends and the OR rule nobody expects
Fill in both day fields and cron runs when either one matches
Most fields combine with AND: a minute of 0 and an hour of 9 means 09:00 and nothing else. The two day fields are the exception. When both day-of-month and day-of-week are restricted, the command runs “when either field matches the current time,” in the words of the crontab(5) manual. The man7 copy of the page gives the example 30 4 1,15 * 5, which runs on the 1st, the 15th and every Friday.
The classic victim of this rule is the person who wants a job on Friday the 13th and writes 0 0 13 * 5. The parser counted what that line actually does over calendar 2026:
0 0 13 * 5 | At 00:00, on day 13 of the month, or on Friday
next: Fri 11-20, Fri 11-27, Fri 12-04, Fri 12-11, Sun 12-13
0 0 13 * 5 fires in 2026: 61 times
Friday-the-13ths among them: 3 (February, March, November)
Sixty-one runs to hit three intended dates. croniter’s own documentation says its default follows this OR behavior and offers a day_or switch to make it AND, per its PyPI page. Cron itself has no such switch. The usual workaround is to schedule on one field and test the other in the command, for example 0 0 13 * * [ "$(date +\%u)" = 5 ] && /usr/local/bin/job. That line also contains the escaped percent sign, which leads to the next problem.

The percent sign and the PATH: two traps, tested
Cron is not a shell prompt, and it does not read the profile that makes the shell prompt friendly
The percent sign first. The manual says that a % in the command field, unless escaped with a backslash, “will be changed into newline characters,” and everything after the first one is sent to the command as standard input (Debian crontab(5); man7 crontab(5)). Three test lines went into root’s crontab on the container:
* * * * * echo "disk at 90%" > /tmp/crontest/pct-broken.out 2>&1
* * * * * echo "disk at 90\%" > /tmp/crontest/pct-escaped.out 2>&1
* * * * * cat > /tmp/crontest/pct-stdin.out%line one%line two
One minute later, syslog and the test directory told the story:
CRON[12347]: (root) CMD (echo "disk at 90)
CRON[12349]: (root) CMD (echo "disk at 90%" > /tmp/crontest/pct-escaped.out 2>&1)
CRON[12350]: (root) CMD (cat > /tmp/crontest/pct-stdin.out)
CRON[12345]: (CRON) info (No MTA installed, discarding output)
== pct-escaped.out
disk at 90%
== pct-stdin.out
line one
line two
The broken line never produced pct-broken.out, because the redirect lived after the percent sign and became input instead of shell syntax. Its error went to cron’s mailer, and with no mail transfer agent on the box, cron logged that it was “discarding output.” The third line shows the feature the percent sign was built for: feeding a few lines of text into a command. The same rule is why a date +%F backup filename that works in a terminal fails without a sound in cron, unless the percent sign is written \%.
Then PATH. A test job ran env and wrote the result to a file:
HOME=/root
LOGNAME=root
PATH=/usr/bin:/bin
LANG=C.UTF-8
SHELL=/bin/sh
PWD=/root
Two directories. The Debian manual documents exactly that default, “PATH is set to “/usr/bin:/bin”,” and the shell is /bin/sh, not bash. A small script was placed at /opt/tools/bin/mytool and called by bare name:
/bin/sh: 1: mytool: not found
The fix is either a full path in the command or a PATH= line at the top of the crontab. With PATH=/opt/tools/bin:/usr/local/bin:/usr/bin:/bin added, the same job printed mytool ran. One catch: the value is literal. The manual says the value string is not parsed for environment substitutions, and it gives PATH = $HOME/bin:$PATH as an example that “will not work as you might expect.” Spell the directories out.
@reboot and the other nicknames
“Startup” means the moment the cron daemon starts, which is not always a reboot
Cron accepts shorthand in place of the five fields: @reboot, @yearly (or @annually), @monthly, @weekly, @daily and @hourly are listed in the man7 crontab(5) page. @daily is the same as 0 0 * * *, and @hourly is 0 * * * *. They read better than the numbers.
@reboot is the odd one. The Debian manual describes it as “Run once, at startup,” and then defines startup as the time the cron daemon starts. On Debian’s cron, a marker file decides whether a daemon start counts. The test container had a /run/crond.reboot file from the first daemon start. After stopping cron, deleting that file and starting cron again, the @reboot line fired:
CRON[11933]: (root) CMD (echo "reboot job ran" > /tmp/crontest/reboot.out)
== reboot.out
reboot job ran
That test simulates a boot. It is not one, since the container never restarted, and the file location is specific to this package build. The practical lesson holds either way: an @reboot job runs early, possibly before the network or a mounted drive is ready. A sleep 30 && in front is a crude patch. A systemd unit with proper ordering is the real one, and the trade-offs between the two approaches are laid out in the x9m8 comparison of systemd timers vs cron.

Where people get burned
Most cron failures make no noise at all, and that is the failure
- Silent output. Cron mails a job’s output to the crontab owner when
MAILTOis unset or names someone, and sends nothing whenMAILTO="", per man7 crontab(5). On a server with no mail system, the test box simply logged “No MTA installed, discarding output.” Redirect to a log file,>> /var/log/myjob.log 2>&1, and give that file a rotation rule before it grows for a year. - The missing final newline. The manual states that cron “requires that each entry in a crontab end in a newline character” and treats a last line without one as broken (man7 crontab(5)). Editors that strip trailing newlines leave the last job dead.
- Daylight saving time. The cronie version of crontab(5) warns that jobs scheduled in the skipped spring hour “will never match,” and jobs in the repeated autumn hour can run twice (man7 crontab(5)). A 02:30 job is exactly where that bites in the United States. Debian’s cron has its own handling, so check the page for the package actually installed.
crontab -r. The crontab(1) page says-rremoves the current crontab, and only-iadds a yes-or-no prompt. Keep a copy:crontab -l > ~/crontab.bak.- Scripts that fail halfway. Cron runs the command and walks away, and
/bin/shkeeps going after errors unless told otherwise. Joining steps with&&means a failed step stops the line instead of feeding garbage to the next one.
When cron is the wrong tool
The strongest argument against cron is that it cannot tell anyone a job failed
There is a serious case for not using cron for anything that matters. It does not record exit codes in a place anyone looks, it does not retry, it does not know about missed runs while a machine was off, and it does not prevent two copies of a slow job from overlapping. A five-minute job that sometimes takes six will eventually stack up like cars at a dead traffic light. systemd timers address the missed-run gap with Persistent=, which starts the job right away if it “would have been triggered at least once during the time when the timer was inactive,” per the systemd.timer manual.
Cron still earns its spot. It is installed nearly everywhere, the syntax fits on one line, and one crontab -l shows a machine’s entire schedule. For overlapping runs, flock in front of the command is a cheap padlock. For a small nightly job, a one-line crontab entry plus a log file is often all the machinery it deserves.
Old entries also carry assumptions that never get reread. The x9m8 guide to preparing ACME renewals for 64-day certificates starts by searching cron files for renewal windows hard-coded around 90-day certificates. The harder truth is that a cron schedule is a promise nobody checks. The parser can prove when a line will fire. It cannot prove the job did anything. What is the oldest cron job still running on a machine near you, and when did anyone last read its output?
Sources
- Debian crontab(5) manual (cron package): https://manpages.debian.org/bullseye/cron/crontab.5.en.html
- Debian crontab(1) manual: https://manpages.debian.org/bullseye/cron/crontab.1.en.html
- crontab(5), cronie, man7.org: https://man7.org/linux/man-pages/man5/crontab.5.html
- Ubuntu 24.04 crontab(5) manual: https://manpages.ubuntu.com/manpages/noble/man5/crontab.5.html
- systemd.timer manual: https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html
- croniter on PyPI: https://pypi.org/project/croniter/
- Test output: Ubuntu 24.04 container, cron 3.0pl1-184ubuntu2, croniter 7.0.0, cron-descriptor 2.3.5 (run for this post)
