heartbeat
Dead man's switch for cron jobs, scheduled tasks, and recurring agent runs — the INVERSE of uptime_monitor: the JOB pings Mockbird, and if the ping stops arriving the alert fires once (plus one recovery message when pings resume). action:"create" {name?, period_minutes, grace_minutes?, notify?}: period_minutes = how often the job runs (30–10080); grace defaults to half the period. With notify, missed check-ins hit that webhook; WITHOUT notify you get a pollable heartbeat instead — poll for missed-check-in transitions, no webhook needed. Returns a ping URL (curl -fsS -m 10 at the end of the job — or call this tool with action:"ping"), a public status page /status/:id, badge.svg, Atom feed, and {id, secret} — STORE id, secret AND ping_url; they cannot be recovered. Creation counts as the first ping. action:"ping" {ping_url}: check in (use this to arm a heartbeat for YOUR OWN recurring runs — ping each run, and a missed run alerts your human via the webhook or your next poll). action:"poll" {id, secret}: (webhook-less heartbeats) missed-check-in / checked-in-again transitions since your last poll plus the current ping age. action:"info" {id, secret}: last ping, ping URL, recent evaluations. action:"delete" {id, secret}: disarm. notify formats are the same as uptime_monitor (Slack/Discord native, HMAC-signed JSON otherwise). Limits: 5 live heartbeats per IP — deleting one frees the slot immediately; evaluation granularity 30 min; pollable heartbeats with no polls and no pings for 30 days are removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | poll/info/delete: the heartbeat id (hb-…) returned by create. | |
| name | No | create: a label for the job (shown on the status page), e.g. "nightly backup". | |
| action | Yes | What to do. | |
| notify | No | create (optional): the webhook URL to alert when the ping stops. Omit it to get a pollable heartbeat instead. | |
| secret | No | poll/info/delete: the secret returned by create. | |
| ping_url | No | ping: the ping URL returned by create (https://…/ping/p-…). | |
| grace_minutes | No | create: extra slack before alerting (5–1440). Default: half the period. | |
| period_minutes | No | create: how often the job is supposed to run, in minutes (30–10080). |