schedule restarts between 5:00 - 6:59 to avoid backup collusions

This commit is contained in:
Moritz 2025-02-04 15:28:01 +01:00
parent 75035e7961
commit cfcad80523

View file

@ -1,6 +1,6 @@
- name: schedule restart randomly between 2-5 AM if necessary
shell: |
hour=$(shuf -i 2-5 -n 1)
hour=$(shuf -i 5-6 -n 1)
minute=$(shuf -i 0-59 -n 1)
shutdown -r "$hour:$minute"
echo "restart scheduled for $hour:$minute"