-
Notifications
You must be signed in to change notification settings - Fork 0
Enable cron scheduler
cron is a scheduling daemon that allows the system to automatically run programs and other jobs on a set schedule. In Arch systems, cronie, an implementation of cron, is used.
Notably, cronie is essential for setting up automatic system backups through timeshift. This ensures the system automatically creates snapshots on system boot, every hour, etc. at user-defined frequencies.
Note
See: cron manpage, cron wiki guide, cronie timed tasks guide
To install cronie, enter:
sudo pacman -S croniecronie is disabled by default and must be manually enabled with:
sudo systemctl enable cronie.serviceOnce scheduled snapshots are configured in timeshift, the cronie scheduler will run regular jobs to automatically create snapshots.
Warning
Make sure that system daemons are inactive before disabling them.
daemons such as cronie are needed for essential services. Forcibly disabling them while they are still active (and possibly running jobs) may cause the system to become unstable.
-
First, stop the
cronieprocess with:systemctl stop cronie.service
-
Check that the process is inactive by running:
systemctl status cronie.service
Terminal output with active process:
cronie.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; preset: disabled)
Active: active (running) since Day YYYY-MM-DD HH:MM:SS -timezone; 00h 00min ago
...- After verifying that
cronieis inactive, enter:systemctl disable cronie.service
cron has several implementations with variations in scheduling and job management.
cronie comes with the anacron utility enabled by default, which will run backlogged jobs for systems not continuously running (ex. personal computers).
Note
See: anacron manpage