Add daily stats collection cron job at 05:00 UTC

The gniza stats command is now automatically scheduled when
install_schedules() runs, tagged as # gniza:_stats so it is
managed alongside backup schedules (installed/removed together).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-05 05:33:55 +02:00
parent 325020338d
commit bf6624b607

View File

@@ -206,6 +206,10 @@ install_schedules() {
filtered+="$line"$'\n' filtered+="$line"$'\n'
done <<< "$current_crontab" done <<< "$current_crontab"
# Append daily stats collection (runs at 05:00 UTC)
new_lines+="${GNIZA_CRON_TAG}_stats"$'\n'
new_lines+="0 5 * * * /usr/local/bin/gniza stats >> /var/log/gniza/cron-stats.log 2>&1"$'\n'
# Append new lines # Append new lines
local final="${filtered}${new_lines}" local final="${filtered}${new_lines}"