Notes to Self

Alex Sokolsky's Notes on Computers and Programming

cron

man cron, man crontab, Understanding Crontab in Linux With Examples.

Also relevant: man anacron, man anacrontab

Also relevant systemd timers

Logs

Because cron runs as a service:

journalctl -u cron
cat /var/log/syslog|grep cron

Example

To shutdown at night /etc/cron.d/good_night:

#
# shutdown this machine at 0:55
#
50 0 * * * root /usr/sbin/shutdown +5

To cancel such shutdown just do:

sudo shutdown -c