← back to Marketing Command Center
chore(mcc): move IG re-pull schedule from Mac2 launchd to Kamatera-local cron
5d1c41bc8ed52970f00a90b123fcc40b85adf04f · 2026-07-22 12:20:02 -0700 · Steve Abrams
The re-pull's script AND data both live on Kamatera, so a Mac2 launchd job SSHing
in was a needless cross-machine dependency (Mac2 asleep / SSH hiccup at 06:20 would
silently skip it — the exact drift the job exists to prevent). Now a self-contained
root crontab entry on Kamatera (06:40 daily). Removed the Mac2 wrapper + plist;
added scripts/ig-repull-SCHEDULE.md documenting the cron. Verified: cron present,
a manual Kamatera run wrote a fresh healthy status, Mac2 job booted out + gone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
D scripts/com.steve.mcc-ig-repull.plistA scripts/ig-repull-SCHEDULE.mdD scripts/ig-repull-cron.sh
Diff
commit 5d1c41bc8ed52970f00a90b123fcc40b85adf04f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 22 12:20:02 2026 -0700
chore(mcc): move IG re-pull schedule from Mac2 launchd to Kamatera-local cron
The re-pull's script AND data both live on Kamatera, so a Mac2 launchd job SSHing
in was a needless cross-machine dependency (Mac2 asleep / SSH hiccup at 06:20 would
silently skip it — the exact drift the job exists to prevent). Now a self-contained
root crontab entry on Kamatera (06:40 daily). Removed the Mac2 wrapper + plist;
added scripts/ig-repull-SCHEDULE.md documenting the cron. Verified: cron present,
a manual Kamatera run wrote a fresh healthy status, Mac2 job booted out + gone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
scripts/com.steve.mcc-ig-repull.plist | 24 ------------------------
scripts/ig-repull-SCHEDULE.md | 12 ++++++++++++
scripts/ig-repull-cron.sh | 18 ------------------
3 files changed, 12 insertions(+), 42 deletions(-)
diff --git a/scripts/com.steve.mcc-ig-repull.plist b/scripts/com.steve.mcc-ig-repull.plist
deleted file mode 100644
index 92427be..0000000
--- a/scripts/com.steve.mcc-ig-repull.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>Label</key>
- <string>com.steve.mcc-ig-repull</string>
- <key>ProgramArguments</key>
- <array>
- <string>/bin/zsh</string>
- <string>/Users/macstudio3/Projects/marketing-command-center/scripts/ig-repull-cron.sh</string>
- </array>
- <key>StartCalendarInterval</key>
- <dict>
- <key>Hour</key><integer>6</integer>
- <key>Minute</key><integer>20</integer>
- </dict>
- <key>RunAtLoad</key>
- <false/>
- <key>StandardOutPath</key>
- <string>/Users/macstudio3/.claude/logs/mcc-ig-repull.out</string>
- <key>StandardErrorPath</key>
- <string>/Users/macstudio3/.claude/logs/mcc-ig-repull.err</string>
-</dict>
-</plist>
diff --git a/scripts/ig-repull-SCHEDULE.md b/scripts/ig-repull-SCHEDULE.md
new file mode 100644
index 0000000..5bb0ceb
--- /dev/null
+++ b/scripts/ig-repull-SCHEDULE.md
@@ -0,0 +1,12 @@
+# IG media re-pull — schedule
+
+Runs **daily 06:40 on Kamatera** via root crontab (self-contained; the script and
+its data both live on Kamatera, so no cross-machine dependency):
+
+ 40 6 * * * cd /root/DW-Agents/marketing-command-center && /usr/bin/node scripts/ig-media-repull.js --apply >> /root/DW-Agents/logs/mcc-ig-repull.log 2>&1 # mcc-ig-repull
+
+The board shows the last run at a glance (IG re-pull health strip + Run-now button).
+
+History: was a Mac2 launchd job (com.steve.mcc-ig-repull) SSHing into Kamatera;
+moved to a Kamatera-local cron 2026-07-22 to drop the needless Mac2 dependency
+(a Mac2-asleep/SSH-hiccup at run time would have silently skipped it).
diff --git a/scripts/ig-repull-cron.sh b/scripts/ig-repull-cron.sh
deleted file mode 100755
index b87663f..0000000
--- a/scripts/ig-repull-cron.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/zsh
-# Daily IG media re-pull — runs ON Kamatera (where the live outbox + tokens live)
-# from a Mac2 launchd LaunchAgent (com.steve.mcc-ig-repull), matching the DW
-# scheduled-ops pattern (launchd on Mac2 SSHing to Kamatera, like the canaries).
-#
-# It refreshes any SUCCESSFULLY-published Instagram post whose stored mediaUrl is
-# an expiring ig/fbcdn signed URL into a durable local /cache/media copy, before
-# that URL 403s and the thumbnail blanks. Stable non-IG URLs are left untouched
-# (--apply targeting only touches at-risk images). Safe to run daily / idempotent:
-# already-localized items are skipped, and it backs up the outbox before writing.
-LOG="$HOME/.claude/logs/mcc-ig-repull.log"
-mkdir -p "$(dirname "$LOG")"
-{
- echo "===== $(date '+%Y-%m-%d %H:%M:%S %Z') ====="
- ssh -o BatchMode=yes -o ConnectTimeout=20 root@45.61.58.125 \
- 'cd /root/DW-Agents/marketing-command-center && node scripts/ig-media-repull.js --apply'
- echo "exit=$?"
-} >> "$LOG" 2>&1
← 6b2db25 auto-save: 2026-07-22T12:13:58 (1 files) — data/ig-repull-st
·
back to Marketing Command Center
·
chore: version bump (session close) 85f3566 →