A new job in `/etc/cron.d/opskit` never runs. Syslog shows `cron[812]: (*system*opskit) ERROR (Missing newline before EOF, this crontab file will be ignored)`.
BeginnerTroubleshootingTroubleshooting: cron and systemd timers
Answer
Likely causes → cron requires every line, including the last, to end with a newline. The file was generated with printf without \n, or by a config-management template that stripped the final newline, so cron ignores the whole file.
Diagnose →
tail -c 1 /etc/cron.d/opskit | od -c # last byte is not \n
grep -i 'cron.*opskit' /var/log/syslog # or: journalctl -u cron --since today
Fix → Append the newline; cron rereads /etc/cron.d automatically on its next minute check:
printf '\n' >> /etc/cron.d/opskit
Also confirm the file is owned by root, mode 0644, and not group/world writable, or cron ignores it for security (WRONG FILE OWNER / BAD FILE MODE).
Prevent → Ship cron files through config management with an explicit trailing newline and a validation step, or move the job to a systemd timer.
More on Troubleshooting: cron and systemd timers
You copied a line from `crontab -e` into `/etc/cron.d/backup`, and syslog shows `Error: bad username; while reading /etc/cron.d/backup`. Meanwhile a teammate's user crontab mails `/bin/sh: 1: root: not found` every night.BeginnerA script works when you run it, but the cron log email says `/opt/opskit/bin/backup.sh: line 22: aws: command not found`.BeginnerThis crontab line never produces a log file, and cron mails `/bin/sh: 1: Syntax error: end of file unexpected (expecting ")")`: `0 2 * * * /opt/backup.sh > /var/log/backup-$(date +%F).log 2>&1`IntermediateA cron job fails intermittently, but there are no emails and no logs. Syslog shows `(CRON) info (No MTA installed, discarding output)`.BeginnerA cron job that runs `docker exec -it db pg_dumpall` fails with `the input device is not a TTY`.IntermediateTwo schedules misbehave: `*/90 * * * *` runs every hour, not every 90 minutes, and `0 3 1-7 * 1` ("first Monday of the month") runs every Monday and on days 1 to 7.Intermediate