This commit is contained in:
2026-02-13 05:55:06 +02:00
parent e4b1e8a7ba
commit 6947fc95f1

View File

@@ -138,6 +138,12 @@ dispatch_task() {
rnd=$(( (RANDOM % 4) + 1 )) # 1..4
total_h=$(( ceil_h + rnd - 1 ))
# NEW: if rebootin is huge (>=18h), convert to immediate reboot (0h)
if (( total_h >= 18 )); then
total_h=0
log "Adjusted _tonight rebootin to 0h because computed value was >=18h"
fi
extra_nbplay_opts+=("-erebootin=${total_h}")
log "Resolved '${task}' → base='${base_task}', rebootin=${total_h}h (ceil_to_1am=${ceil_h}h + rand=${rnd}h)"
elif [[ "$base_task" =~ ^update-rebootin_([0-9]{1,2})$ ]]; then