What the "Cron service not running" Error Means
The error "cron service not running" (or its Russian equivalent "служба cron не запущена") means that the cron daemon—the system service responsible for executing scheduled tasks—is not currently active. Without a running daemon, crontab files where you add jobs (e.g., via crontab -e) will not be executed. You may encounter this issue when:
- Tasks that were supposed to run do not execute.
- Attempting to add a job via
crontab -edisplays a warning. - The command
systemctl status cron(orservice cron status) shows a status ofinactive (dead)orstopped. - Logs (
/var/log/syslogorjournalctl -u cron) lack entries indicating task execution.
Common Causes
- The service was not started after installation. In some distributions (e.g., minimal installations), the cron service is not activated by default.
- The service was manually stopped. An administrator or script may have executed
systemctl stop cron. - Service failure. The cron daemon may have terminated unexpectedly due to corrupted configuration (
/etc/crontab, files in/etc/cron.d/) or insufficient system resources. - The service is not enabled for autostart. After a system reboot, cron does not start automatically.
- Use of an outdated init system (SysVinit) with missing symbolic links. In systems using the old init, necessary links in
/etc/rc?.d/might be absent.
Method 1: Starting and Enabling Autostart via systemd (Modern Systems)
Most modern distributions (Ubuntu 16.04+, Debian 8+, CentOS 7+, RHEL 7+) use systemd.
- Check the service status:
systemctl status cron
Or, if the service is namedcrond(common in RHEL/CentOS/Fedora):systemctl status crond
Look for theActive:line in the output. If it saysinactive (dead)orfailed, the service is not running. - Start the service immediately:
sudo systemctl start cron
Or forcrond:sudo systemctl start crond - Enable autostart for the service:
sudo systemctl enable cron
This command creates symbolic links to ensure cron starts on every system boot. Forcrond, usesudo systemctl enable crond. - Restart the service to apply changes (if configurations were modified):
sudo systemctl restart cron - Verify the service is active and enabled:
systemctl is-active cron && echo "Active" || echo "Not active" systemctl is-enabled cron && echo "Enabled" || echo "Not enabled"
Method 2: Management via the service Utility (Universal Wrapper)
The service utility is a wrapper that automatically detects whether systemd or classic SysVinit is used in the system and calls the appropriate tool. It can be convenient for writing scripts that run on different systems.
- Check status:
sudo service cron status - Start the service:
sudo service cron start - Enable autostart (for SysVinit):
sudo update-rc.d cron defaults
Note: On systemd systems, the commandsudo service cron enabletypically just callssystemctl enableand works identically to Method 1. - Stop the service:
sudo service cron stop
Method 3: Manual Management for SysVinit (Older Systems)
Very old distributions (e.g., CentOS 6, Debian 7) or specialized containers may use the classic init.
- Check for an init script:
ls -l /etc/init.d/cron
If the file is missing, the cron service is likely not installed. - Start the service directly:
sudo /etc/init.d/cron start - Enable autostart via
update-rc.d(Debian/Ubuntu) orchkconfig(RHEL/CentOS 6):- For Debian/Ubuntu:
sudo update-rc.d cron defaults - For RHEL/CentOS 6:
sudo chkconfig cron on
- For Debian/Ubuntu:
Method 4: Diagnostics if the Service Fails to Start or Crashes Immediately
If start commands do not succeed and status shows failed:
- View systemd logs for the service:
sudo journalctl -u cron -b --no-pager
Key flags:-u cron(filter by unit),-b(logs since last boot). Look for lines containingFailedorError. - Check the integrity of cron configuration files:
- Main file:
/etc/crontab. - Directories:
/etc/cron.d/,/etc/cron.hourly/,/etc/cron.daily/,/etc/cron.weekly/,/etc/cron.monthly/. - Check syntax. Common errors: incorrect delimiter (5 fields in
/etc/crontab, not 6), missing user field in a line, non-existent command path. - Test syntax (for some versions):
sudo crontab -l -u root 2>/dev/null || echo "Check /etc/crontab manually"
- Main file:
- Ensure there is free disk space:
df -h /
If the disk is full (>95%), the daemon may fail to start. - Check for conflicts with other software. Sometimes packages like
anacroncan affect behavior. Try temporarily renaming the/etc/cron.d/directory and restarting the service to test.
Prevention
- Regularly check the service status after system updates or configuration changes.
systemctl is-active cron || echo "Cron is down!" - Do not edit system crontab files (
/etc/crontab,/etc/cron.d/*) directly without first validating syntax. Usecrontab -efor user-specific jobs. - Before rebooting after configuring cron, ensure the service is enabled for autostart:
systemctl is-enabled cron. - Set up monitoring. Add a simple cron status check to your monitoring system (Zabbix, Nagios, Prometheus node_exporter) or to a script that runs more frequently than once a minute.
- Monitor space on the system partition. A full root partition (
/) is a common cause of system service failures.