modernize macOS launchd job management by replacing launchctl load/unload with bootstrap/bootout and print for domain-target introspection

domain: developer.apple.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Identify the target domain: system domain for root daemons, gui/<uid> for a logged-in user's LaunchAgents (or user/<uid> for non-GUI sessions).
  2. Load a job into the domain with `launchctl bootstrap gui/$UID /Library/LaunchAgents/com.example.job.plist` instead of the deprecated `launchctl load`.
  3. Unload it with `launchctl bootout gui/$UID/com.example.job` (service target) instead of `launchctl unload`.
  4. Inspect a loaded job's live state with `launchctl print gui/$UID/com.example.job` to see PID, last exit status, and next scheduled run.
  5. Enable or disable a job definition without removing it using `launchctl enable`/`launchctl disable gui/$UID/com.example.job`.

Known gotchas

Related routes

Create a launchd system daemon on macOS that runs as root and restarts automatically on failure
developer.apple.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans