Skip to content

Instantly share code, notes, and snippets.

@grantjenks
Created May 3, 2020 20:28
Show Gist options
  • Save grantjenks/10da869c3e005fa16525c0b54bd5c96b to your computer and use it in GitHub Desktop.
Save grantjenks/10da869c3e005fa16525c0b54bd5c96b to your computer and use it in GitHub Desktop.
Weekly reboots using systemd.
# /etc/systemd/system/reboot.service
[Unit]
Description=Reboot Service
[Service]
Type=oneshot
ExecStart=/bin/systemctl --force reboot
# /etc/systemd/system/reboot.timer
[Unit]
Description=Reboot Timer
[Timer]
OnCalendar=Sun *-*-* 09:30:00
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable reboot.timer
systemctl start reboot.timer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment