Skip to content

Instantly share code, notes, and snippets.

@hkoba
Last active January 21, 2025 08:12
Show Gist options
  • Save hkoba/e05c91ebdd4e2ffd1d79e78e76cf1ff5 to your computer and use it in GitHub Desktop.
Save hkoba/e05c91ebdd4e2ffd1d79e78e76cf1ff5 to your computer and use it in GitHub Desktop.
systemd service and timer for scheduled reboot.
[Unit]
Description=Scheduled Reboot
[Service]
Type=simple
ExecStart=/usr/bin/systemctl --force reboot
[Unit]
Description=Reboot Scheduling.
[Timer]
OnCalendar=*-*-* 01:30:00
[Install]
WantedBy=multi-user.target
@IOAndreBeukes
Copy link

You also need to issue the start command to enable to timer schedule:
systemctl start sched-reboot.timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment