← back to Ga4 Dashboard

launchd/com.steve.ga4-etl.plist

49 lines

<?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">
<!--
  GA4 ETL hourly refresh — Steve-gated, do NOT install without approval.

  To install when ready:
    cp ~/Projects/ga4-dashboard/launchd/com.steve.ga4-etl.plist ~/Library/LaunchAgents/
    launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.steve.ga4-etl.plist

  To uninstall:
    launchctl bootout gui/$(id -u)/com.steve.ga4-etl
    rm ~/Library/LaunchAgents/com.steve.ga4-etl.plist

  Alternatively, use crontab (simpler):
    crontab -e
    # add: 0 * * * * cd /Users/macstudio3/Projects/ga4-dashboard && python3 etl.py >> /tmp/ga4-etl.log 2>&1
-->
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.steve.ga4-etl</string>
  <key>ProgramArguments</key>
  <array>
    <string>/opt/homebrew/bin/python3</string>
    <string>/Users/macstudio3/Projects/ga4-dashboard/etl.py</string>
  </array>
  <key>WorkingDirectory</key>
  <string>/Users/macstudio3/Projects/ga4-dashboard</string>
  <key>StartInterval</key>
  <integer>3600</integer>
  <key>RunAtLoad</key>
  <true/>
  <key>StandardOutPath</key>
  <string>/tmp/ga4-etl.log</string>
  <key>StandardErrorPath</key>
  <string>/tmp/ga4-etl.log</string>
  <key>EnvironmentVariables</key>
  <dict>
    <key>GOOGLE_APPLICATION_CREDENTIALS</key>
    <string>/Users/macstudio3/.config/ga-analytics-agent/service-account.json</string>
    <key>HOME</key>
    <string>/Users/macstudio3</string>
    <key>PATH</key>
    <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
  </dict>
</dict>
</plist>