monthly_maintenance: reschedule to 0 0 15 * * (15th at midnight)

Previously ran daily at 3am with internal self-gating. Now scheduled directly
on the 15th — uptime and interval gates still apply; a skip means next month's 15th.
This commit is contained in:
Gmer4Lfe
2026-05-24 23:10:31 -04:00
parent dfb462a18e
commit 83195ebb9e
2 changed files with 11 additions and 13 deletions
+4 -5
View File
@@ -7,15 +7,14 @@
# 1. Server uptime >= MONTHLY_UPTIME_THRESHOLD_DAYS days
# 2. Last run was >= MONTHLY_RUN_INTERVAL_DAYS days ago (or never run)
#
# ── WHY UPTIME-TRIGGERED, NOT CRON ───────────────────────────────────────────────────────────
# ── WHY UPTIME-GATED ─────────────────────────────────────────────────────────────────────────
# A scheduled reboot resets uptime. Monthly tasks (ZFS scrub, SMART long test) need a
# stable, settled system — not one that just rebooted. Uptime-gating ensures maintenance
# only runs after the server has been healthy for a full month, never immediately post-boot.
# The daily cron is just the trigger mechanism. The uptime and interval checks inside
# the script are what enforce the monthly cadence.
# If uptime or interval gate is not met on the 15th, the run is skipped until next month.
#
# ── HOW TO CALL ──────────────────────────────────────────────────────────────────────────────
# Cron: 0 3 * * * — daily 3am check. Script self-gates — calling it daily is safe.
# Schedule: 0 0 15 * * (15th of each month at midnight)
# Silent exit 0 when either gate is not met. Only outputs when maintenance actually fires.
#
# ── STATE FILE ────────────────────────────────────────────────────────────────────────────────
@@ -153,7 +152,7 @@ if [[ "$SHOW_STATUS" == true ]]; then
fi
echo ""
echo " Schedule: 0 3 * * * (daily check — script self-gates)"
echo " Schedule: 0 0 15 * * (15th of each month at midnight)"
echo " Force flag: --force bypasses both gates"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
exit 0