# Operations ## launchd as code The LaunchAgents are never hand-edited. [`scripts/launchd.sh`](https://github.com/saifulislamamiyo/guardrail-trader/blob/main/scripts/launchd.sh) generates them from the repo's own path, so anyone who clones the repo gets identical agents: | Command | What it does | |---|---| | `scripts/launchd.sh render` | Print the three plists it would install. Writes nothing. | | `scripts/launchd.sh install` | Native mode: write the plists to `~/Library/LaunchAgents` and load them | | `scripts/launchd.sh docker-mode` | Remove the scheduler + dashboard agents; keep keep-awake | | `scripts/launchd.sh status` | State, PID and last exit code of each agent | | `scripts/launchd.sh uninstall` | Unload and delete all three | | Label | Starts | Runs | |---|---|---| | `com.guardrail-trader.scheduler` | every 900 s (`StartInterval`) | `.venv/bin/python scripts/scheduled_run.py` | | `com.guardrail-trader.dashboard` | at login, restarted if it exits (`KeepAlive`) | `.venv/bin/python scripts/dashboard.py --no-browser` | | `com.guardrail-trader.awake` | `KEEP_AWAKE_START` local, default 18:00 (`StartCalendarInterval`), and at load | `.venv/bin/python scripts/keep_awake.py` | All three use the project's **venv Python**, and write logs to `logs/