← back to Commercialrealestate
fix(launchd): pin PATH so node resolves — both CRCP jobs were failing (email exit127, listings N=0/node-not-found); contrarian caught it, kickstart-verified email now sends end-to-end
d6c8616b9046406a1ae4e61e061277da1f6cb0e8 · 2026-07-13 09:45:01 -0700 · Steve
Files touched
M scripts/refresh-listings-rotating.shM scripts/run-email-alerts.sh
Diff
commit d6c8616b9046406a1ae4e61e061277da1f6cb0e8
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Jul 13 09:45:01 2026 -0700
fix(launchd): pin PATH so node resolves — both CRCP jobs were failing (email exit127, listings N=0/node-not-found); contrarian caught it, kickstart-verified email now sends end-to-end
---
scripts/refresh-listings-rotating.sh | 4 ++++
scripts/run-email-alerts.sh | 3 +++
2 files changed, 7 insertions(+)
diff --git a/scripts/refresh-listings-rotating.sh b/scripts/refresh-listings-rotating.sh
index f3ce609..6e93c33 100755
--- a/scripts/refresh-listings-rotating.sh
+++ b/scripts/refresh-listings-rotating.sh
@@ -5,6 +5,10 @@
# and the email-alerts diff surfaces new listings as a daily trickle.
#
# Deterministic rotation: day-of-year picks which SLICE of the metro list runs today.
+# launchd runs with a minimal PATH that does NOT include Homebrew, so bare `node`
+# fails with "command not found" (which silently made N=0 → division-by-zero, exit 0,
+# no metros swept). Pin PATH so every node / node -e call resolves.
+export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
export NODE_PATH="$HOME/.claude/skills/browserbase/node_modules"
cd "$HOME/Projects/commercialrealestate" || exit 1
diff --git a/scripts/run-email-alerts.sh b/scripts/run-email-alerts.sh
index 6a342b4..bc095ba 100644
--- a/scripts/run-email-alerts.sh
+++ b/scripts/run-email-alerts.sh
@@ -2,6 +2,9 @@
# CRCP email-alerts runner (invoked by launchd once approved).
# Sources .env for GEORGE_URL + GEORGE_EXTERNAL_SEND_TOKEN, then runs the
# snapshot-diff alert engine in SEND mode (which also advances seen-state).
+# launchd runs with a minimal PATH that does NOT include Homebrew, so bare
+# `node` / `/usr/bin/env node` fail with exit 127. Pin PATH so node resolves.
+export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
set -a
[ -f "$HOME/Projects/commercialrealestate/.env" ] && . "$HOME/Projects/commercialrealestate/.env"
set +a
← 00b7b5b 5x re-verify: homepage core 6/6 green, 0 JS errors; Jul-10 f
·
back to Commercialrealestate
·
auto-save: 2026-07-13T09:54:06 (1 files) — data/alerts-state 96492dc →