]> git.ekhem.eu.org Git - cron.git/commitdiff
Reboot the system daily.
authorJakub Czajka <jakub@ekhem.eu.org>
Wed, 29 Nov 2023 23:23:19 +0000 (00:23 +0100)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:34:02 +0000 (19:34 +0100)
reboot.service [new file with mode: 0644]
reboot.timer [new file with mode: 0644]

diff --git a/reboot.service b/reboot.service
new file mode 100644 (file)
index 0000000..8d729d8
--- /dev/null
@@ -0,0 +1,10 @@
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+[Unit]
+Description=Reboot the system.
+OnFailure=notify_failure@%n.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl --force reboot
diff --git a/reboot.timer b/reboot.timer
new file mode 100644 (file)
index 0000000..2293c3c
--- /dev/null
@@ -0,0 +1,11 @@
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+[Unit]
+Description=Reboot the system daily.
+
+[Timer]
+OnCalendar=*-*-* 03:00:00
+
+[Install]
+WantedBy=timers.target