# Run on macOS

> Let launchd turn the heartbeat and keep the API up.

Loom schedules nothing itself: `python -m loom.core` turns one cycle and exits. To run an agent on its
heartbeat, let the operating system call it. On macOS that is `launchd`.

The Loom repository ships two sample property lists in
[`deploy/launchd/`](https://github.com/benja0rtzzz/loom/tree/main/deploy/launchd):

| File | Runs | How |
|---|---|---|
| `com.loom.core.plist` | `python -m loom.core <bundle>` | `StartInterval`, from the goal's `evaluate_every`. |
| `com.loom.api.plist` | `python -m loom.api <bundle>` | `KeepAlive` on crash, throttled so a crash loop cannot spin. |

They are samples, not an installer: nothing in Loom writes to `~/Library/LaunchAgents` or calls
`launchctl`. Copy them, replace the `__PLACEHOLDER__` paths with absolute ones, and load them
yourself. The folder's README has the one-liners.

Run both from the same working directory, or set `storage.options.path`, so they share one store.

## Elsewhere

On Linux, a systemd timer and service do the same job; any scheduler that can run a command on an
interval works.