Heartbeat
A heartbeat is a per-domain scheduled routine that keeps a domain alive without you opening it — re-score it on a cadence, run a weekly pulse, alert you when context goes stale. Routines are declared in each domain’s manifest.json (manifest.heartbeat) and installed by the engine into the OS scheduler (cron on Linux, launchd on macOS).
Install
Section titled “Install”prevail heartbeat install --jsonInstalls the OS scheduler hooks for all enabled domain heartbeat routines. The engine returns the ids it wired up:
{ "ok": true, "installed": ["wealth-op-weekly-pulse", "health-op-daily-check"] }Status
Section titled “Status”prevail heartbeat status --jsonReports whether the hooks are installed and the state of every routine — schedule, enabled flag, last run, next run:
{ "ok": true, "installed": true, "routines": [ { "domain": "wealth", "id": "wealth-op-weekly-pulse", "schedule": "weekly mon 08:00", "enabled": true, "lastRun": 1749220200000, "nextRun": 1749825000000 } ] }How it relates to briefings and schedule
Section titled “How it relates to briefings and schedule”Prevail has three scheduling surfaces, from highest- to lowest-level:
| Surface | Scope | Declared in |
|---|---|---|
| Heartbeat | Per-domain routines (re-score, pulse, staleness alert) | manifest.heartbeat |
| Briefings | Scheduled domain briefings (council or single, delivered to log/Telegram) | .briefings.json |
| Schedule | Arbitrary recurring prevail commands | .schedule.json |
Where it runs
Section titled “Where it runs”Run heartbeats on the always-on machine that holds your vault — the same machine you’d run the Telegram daemon on. Both lastRun/nextRun are epoch-millisecond machine fields per the JSON API conventions.