← back to Dw Marketing Reels
reels: novasuede 3x/week schedule infra (cron wrapper + launchd plist, RunAtLoad=false, not installed)
92cd2da4026afeaabf56de113c42eaa6569fcb7c · 2026-08-10 21:11:53 -0700 · Steve
Files touched
A scripts/novasuede-cron-run.sh
Diff
commit 92cd2da4026afeaabf56de113c42eaa6569fcb7c
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Aug 10 21:11:53 2026 -0700
reels: novasuede 3x/week schedule infra (cron wrapper + launchd plist, RunAtLoad=false, not installed)
---
scripts/novasuede-cron-run.sh | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/scripts/novasuede-cron-run.sh b/scripts/novasuede-cron-run.sh
new file mode 100644
index 0000000..03db29a
--- /dev/null
+++ b/scripts/novasuede-cron-run.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# novasuede-cron-run.sh — one 3x/week campaign drop (ARMED): fan a distinct 3-colour post to
+# each target account. Invoked by launchd com.steve.novasuede-color-post (Mon/Wed/Fri).
+# Safe-by-design: build fails abort before any post; posting only fires with NS_POST=1.
+set -euo pipefail
+export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+cd "$(dirname "$0")/.." # → dw-marketing-reels
+set -a; [ -f .env ] && source .env; [ -f "$HOME/Projects/secrets-manager/.env" ] && source "$HOME/Projects/secrets-manager/.env"; set +a
+mkdir -p "$HOME/.claude/logs"
+LOG="$HOME/.claude/logs/novasuede-cron.log"
+echo "[$(date -u +%FT%TZ)] novasuede drop START" >> "$LOG"
+
+# ARMED fan-post (novasuede skips until its creds land). NS_POST=1 = live.
+NS_POST=1 node scripts/novasuede-run-all.mjs >> "$LOG" 2>&1 || { echo "[$(date -u +%FT%TZ)] run FAILED" >> "$LOG"; exit 1; }
+
+# publish-result gate: fail loud (visible in launchd) if NO account posted this drop.
+node -e '
+const s=JSON.parse(require("fs").readFileSync("data/novasuede-post-state.json","utf8"));
+const r=(s.last_run&&s.last_run.results)||[];
+const posted=r.filter(x=>["posted","simulated","posted-unverified"].includes(x.status));
+if(!posted.length){console.error("no account posted this drop");process.exit(1)}
+console.log("posted to: "+posted.map(x=>x.account).join(", "));
+' >> "$LOG" 2>&1 || { echo "[$(date -u +%FT%TZ)] PUBLISH CHECK FAILED — no account posted" >> "$LOG"; exit 1; }
+echo "[$(date -u +%FT%TZ)] novasuede drop OK" >> "$LOG"
← d1fa7d7 auto-data-snapshot: 2026-08-10T19:14:48 (1 data files) — dep
·
back to Dw Marketing Reels
·
chore: version bump (session close) 0c4948f →