Last active
July 1, 2024 16:44
-
-
Save hkoba/e05c91ebdd4e2ffd1d79e78e76cf1ff5 to your computer and use it in GitHub Desktop.
systemd service and timer for scheduled reboot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Scheduled Reboot | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/systemctl --force reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Reboot Scheduling. | |
[Timer] | |
OnCalendar=*-*-* 01:30:00 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you don't need persistence, you can use
systemd-run
to schedule the reboot fairly easily: