← back to Dw Pitch Followup

scripts/refresh.sh

13 lines

#!/bin/sh
# refresh.sh — rebuild the pitch lists from FileMaker, then pre-triage the whole board.
# Run by launchd (com.steve.dw-pitch-rebuild) 3x/day + on boot. Both steps are $0 (local).
set -e
DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$DIR"
NODE=/opt/homebrew/bin/node
echo "=== refresh $(date) ==="
"$NODE" scripts/build-lists.js
# pre-triage hits the running server (owns the follow-up cache); non-fatal if it can't
"$NODE" scripts/pretriage.js || echo "[refresh] pretriage skipped/failed (non-fatal)"
echo "=== refresh done $(date) ==="