fix random time scheduling

This commit is contained in:
Moritz 2025-04-02 15:24:40 +02:00
parent 0cf6190b81
commit 5db0f67110
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -26,7 +26,7 @@
- name: Schedule nightly-update.sh to run between 5:00-6:59 AM once
shell: |
hour=$(shuf -i 5-6 -n 1)
minute=$(shuf -i 0-59 -n 1)
minute=$(shuf -i 10-59 -n 1)
echo "/usr/local/bin/nightly-update.sh" | at "$hour:$minute"
echo "update and restart scheduled for $hour:$minute"
register: restard_scheduled