piframe/docs/cron.md

24 lines
748 B
Markdown
Raw Normal View History

2020-08-01 00:00:56 +00:00
# cron/Scheduler
The below commands will setup a cron daemon (scheduler) for running things like backups, statistic gathering and more via a schedule. While technically not required, we *strongly* recommend using cron for backups so you get the output via e-mail (or similar). This is also required if you want to monitor resource utilization via ```munin```.
## Important Notes
* This assumes you have setup ```msmtp``` for email notifications
## Setup
``` sh
pacman -S cronie
mkdir /etc/systemd/system/cronie.service.d
cat > /etc/systemd/system/cronie.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/crond -n -m '/usr/bin/msmtp -t'
EOF
systemctl daemon-reload
systemctl enable --now cronie
```