← back to Govarbitrage
scripts/run-newsletter-digest.sh
11 lines
#!/bin/sh
# Twice-daily newsletter digest → CONFIRMED subscribers (launchd-invoked).
# George creds injected at runtime; .env supplies the newsletter config.
# sendNewsletterEmail() enforces the live gate (mode + approval token) and
# appends a redacted record of every send to logs/newsletter-outbox.jsonl.
set -e
cd "$(dirname "$0")/.."
. scripts/george-env.sh
export PATH="/opt/homebrew/bin:/usr/bin:/bin:$PATH"
exec /opt/homebrew/bin/npx tsx --tsconfig tsconfig.json scripts/send-newsletter-digest.ts