← back to Tk 11331 Exec

deploy/com.steve.tk11331-d2-sweep.plist

57 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">
<!--
  TK-11331 Decision 2 hands-off daily sweep.
  Runs scripts/d2_daily_sweep.sh once per day at 04:45 local (off-peak; after the
  03:00 pg_dump and the 04:20 scratch janitor, before business hours).
  ONE batch (<=1000 product-writes) per fire; the wrapper self-stops at 3600 and
  boots itself out. RunAtLoad is FALSE so a reboot/bootstrap never fires an
  unattended batch immediately — it waits for the next 04:45.

  Install (Steve):
    cp deploy/com.steve.tk11331-d2-sweep.plist ~/Library/LaunchAgents/
    launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.steve.tk11331-d2-sweep.plist
  Kill switch (Steve):
    launchctl bootout gui/$(id -u)/com.steve.tk11331-d2-sweep
-->
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.steve.tk11331-d2-sweep</string>

  <key>ProgramArguments</key>
  <array>
    <string>/bin/bash</string>
    <string>/Users/macstudio3/Projects/tk-11331-exec/scripts/d2_daily_sweep.sh</string>
  </array>

  <key>WorkingDirectory</key>
  <string>/Users/macstudio3/Projects/tk-11331-exec</string>

  <key>StartCalendarInterval</key>
  <dict>
    <key>Hour</key>
    <integer>4</integer>
    <key>Minute</key>
    <integer>45</integer>
  </dict>

  <key>RunAtLoad</key>
  <false/>

  <key>StandardOutPath</key>
  <string>/Users/macstudio3/Projects/tk-11331-exec/data/sweep-stdout.log</string>

  <key>StandardErrorPath</key>
  <string>/Users/macstudio3/Projects/tk-11331-exec/data/sweep-stderr.log</string>

  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key>
    <string>/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
    <key>HOME</key>
    <string>/Users/macstudio3</string>
  </dict>
</dict>
</plist>