The cron daemon on Ubuntu automates scheduled system maintenance, database backups, log rotations, and periodic background scripts. When system boot logs “Failed to start cron.service: Regular background program processing daemon”, automated background maintenance ceases entirely. Diagnosing this issue involves inspecting cron spool directory permissions and checking crontab syntax errors.
Check Service Status and Systemd Journal Output
Determine the exact crash error code preventing the cron unit from starting.
- Open a terminal (Ctrl + Alt + T).
- Query the service operational status:
systemctl status cron.service - Inspect recent system journal logs:
sudo journalctl -u cron -b --no-pager - If the daemon is masked, unmask and start it immediately:
sudo systemctl unmask cron sudo systemctl enable --now cron
Verify Permissions on Spool and Configuration Directories
Cron strictly refuses to start if permissions on /var/spool/cron/crontabs or /etc/crontab violate POSIX security policies.
- Verify directory permissions on user crontabs:
ls -ld /var/spool/cron/crontabs - Permissions must be set to
1730owned byroot:crontab:sudo chown root:crontab /var/spool/cron/crontabs sudo chmod 1730 /var/spool/cron/crontabs - Ensure
/etc/crontabis owned by root with 644 permissions:sudo chmod 644 /etc/crontab.
Reinstall the cron Package and Test Execution
Corrupted binaries or missing PAM configuration files prevent cron from spawning unprivileged execution contexts.
- Reinstall cron via APT:
sudo apt update && sudo apt install --reinstall cron - Restart the service:
sudo systemctl restart cron.service - Confirm that the daemon is actively running by typing
pgrep -l cron.