fix(cron): correct implementation for cron spam prevention via wrapper script and deploy origin
Ampel / ampel (push) Failing after 21s

This commit is contained in:
Hitonabi
2026-07-27 17:12:39 +02:00
parent 4985977492
commit 7638f0244d
3 changed files with 35 additions and 9 deletions
+2
View File
@@ -108,6 +108,8 @@ cp "$SRC/deploy/fremdblick.sh" "$HOME/.hermes/scripts/fremdblick.sh"
cp "$SRC/deploy/worker.sh" "$HOME/.hermes/scripts/worker.sh"
# Chef-Gutachter-Cron (Orchestrator-Finale): gpt-oss urteilt nachts über die autonome Arbeit.
cp "$SRC/deploy/chef-gutachter-feed.sh" "$HOME/.hermes/scripts/chef-gutachter-feed.sh"
# Wrapper für nächtliche Crons, um Telegram-Spam in den Morgen-Digest zu leiten.
cp "$SRC/deploy/night-cron-wrapper.sh" "$HOME/.hermes/scripts/night-cron-wrapper.sh"
# Release-Radar-Cron (10.07.2026): hält neue hermes-agent-Releases wöchentlich gegen die
# Eigenbau-Landkarte im Wissens-Vault ("mehr Hermes nativ, weniger Eigenkreationen").
cp "$SRC/deploy/hermes-release-radar-feed.sh" "$HOME/.hermes/scripts/hermes-release-radar-feed.sh"
+10 -9
View File
@@ -11,14 +11,15 @@ hermes cron remove karten-gutachter || true
hermes cron remove pruefstand || true
hermes cron remove trend-radar || true
# Neue Crons registrieren mit --no-agent und pipe in notify.sh
hermes cron create --name traum "15 3 * * *" "bash /home/hitonabi/mission-control-v2/deploy/dreaming-feed.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Traum" --no-agent
hermes cron create --name chef-gutachter "30 4 * * *" "bash /home/hitonabi/mission-control-v2/deploy/chef-gutachter-feed.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Chef-Gutachter" --no-agent
hermes cron create --name release-radar "15 5 * * 1" "bash /home/hitonabi/mission-control-v2/deploy/hermes-release-radar-feed.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Release-Radar" --no-agent
hermes cron create --name idle-radar "45 3 * * *" "bash /home/hitonabi/mission-control-v2/deploy/idle-radar-feed.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Idle-Radar" --no-agent
hermes cron create --name selbst-inventur "35 3 * * *" "bash /home/hitonabi/mission-control-v2/deploy/selbst-inventur.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Selbst-Inventur" --no-agent
hermes cron create --name karten-gutachter "0 4 * * *" "bash /home/hitonabi/mission-control-v2/deploy/karten-gutachter.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Karten-Gutachter" --no-agent
hermes cron create --name pruefstand "0 2 * * *" "bash /home/hitonabi/mission-control-v2/deploy/pruefstand/pruefstand.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Prüfstand" --no-agent
hermes cron create --name trend-radar "15 5 * * 6" "bash /home/hitonabi/mission-control-v2/deploy/trend-radar-feed.sh | bash /home/hitonabi/mission-control-v2/deploy/notify.sh -s Trend-Radar" --no-agent
# Neue Crons registrieren mit Wrapper und --deliver origin.
# Dadurch schweigt Hermes cron selbst, und der Wrapper nutzt notify.sh für den Morgen-Digest.
hermes cron create --name traum --deliver origin "15 3 * * *" "Traum dreaming-feed.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name chef-gutachter --deliver origin "30 4 * * *" "Chef-Gutachter chef-gutachter-feed.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name release-radar --deliver origin "15 5 * * 1" "Release-Radar hermes-release-radar-feed.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name idle-radar --deliver origin "45 3 * * *" "Idle-Radar idle-radar-feed.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name selbst-inventur --deliver origin "35 3 * * *" "Selbst-Inventur selbst-inventur.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name karten-gutachter --deliver origin "0 4 * * *" "Karten-Gutachter karten-gutachter.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name pruefstand --deliver origin "0 2 * * *" "Prüfstand pruefstand.sh" --script night-cron-wrapper.sh --no-agent
hermes cron create --name trend-radar --deliver origin "15 5 * * 6" "Trend-Radar trend-radar-feed.sh" --script night-cron-wrapper.sh --no-agent
echo "Crons erfolgreich gefixt!"
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
# Erwartet den Job-Namen und das Skript als ein String oder zwei Argumente
if [ $# -eq 1 ]; then
read -r JOB_NAME SCRIPT_NAME <<< "$1"
else
JOB_NAME="$1"
SCRIPT_NAME="$2"
fi
if [ -z "$SCRIPT_NAME" ]; then
SCRIPT_NAME="$JOB_NAME"
fi
# Pfad zusammenbauen
SCRIPT_PATH="$HOME/mission-control-v2/deploy/$SCRIPT_NAME"
if [ ! -f "$SCRIPT_PATH" ]; then
# Versuche pruefstand/
SCRIPT_PATH="$HOME/mission-control-v2/deploy/pruefstand/$SCRIPT_NAME"
fi
bash "$SCRIPT_PATH" | bash "$HOME/mission-control-v2/deploy/notify.sh" -s "$JOB_NAME"