This is an old revision of the document!
$ crontab -e $ crontab -l
# m h dom mon dow command #5-59/10 * * * * /etc/backup.sh # crontab from root */5 * * * * test $(LANG= top -b -n 1 | grep Cpu | cut -d':' -f2 | cut -d. -f1) -gt 60 && ( date; ps awux ) >> /tmp/ps_cpu_hi.log
$ ls /var/spool/cron/ $ crontab -r
# more /etc/crontab ... # !!!! Don't work with .sh !!!! # mv /etc/mybackup.sh /etc/cron.daily/mybackup # run-parts --report /etc/cron.daily
# cat /etc/crontab # apt install anacron # man anacrontab # cat /etc/anacrontab ... # start anacron # ls /var/spool/anacron
# systemctl list-timers # cat /etc/systemd/system/mybackup.service [Unit] Description=My Backup After=network.target [Service] Type=oneshot ExecStart=/etc/mybackup.sh # systemctl start mybackup.service # cat /etc/systemd/system/mybackup.timer [Unit] Description=Timer for My Backup [Timer] OnCalendar=*:0/10 [Install] WantedBy=timers.target # systemctl daemon-reload # systemctl enable mybackup.timer --now # journalctl -u mybackup.timer # journalctl -u mybackup.service