Heartbeat
Heartbeat is a lightweight, Gateway-owned health loop for one Profile. It records periodic health state and currently watches enabled Cron jobs for a failed last run.
It is not a hidden Cron job, does not appear in the Cron list, and does not call the model on every tick.
Default Behavior
| Setting | Default |
|---|---|
| Enabled | Yes |
| Tick interval | 1 minute |
| Failure cooldown | 15 minutes |
| Delivery target | Gateway event bus |
| Role / Workspace | Profile defaults |
A normal tick records status without sending a message. When it detects a newly changed failed-Cron signature, it emits one notification. The same unchanged failure is not repeated indefinitely.
Check Status
anyy heartbeat status
anyy heartbeat status --json
The result includes enabled state, current status, interval, cooldown, Role, Workspace, delivery targets, count of failed Cron jobs, and last tick time.
Heartbeat also appears in:
anyy status
anyy doctor
Configure Heartbeat
Heartbeat settings are Profile-local under the heartbeat configuration block:
heartbeat:
enabled: true
tick_interval: 1m
failure_cooldown: 15m
delivery_targets:
- gateway
role_id: default
workspace_id: default
There is currently no heartbeat set or manual heartbeat tick command. Back up the Profile before advanced manual editing, validate with anyy doctor, then restart the Gateway if the runtime cannot reload the file.
Heartbeat reports a failed last run; it does not retry or repair the job. Open Dashboard → Cron, inspect the job history, fix the cause, and run or wait for the next scheduled execution.
Notification Delivery
The default target is the Gateway event bus, so the notice appears on connected Anyy surfaces. Channel-specific delivery depends on the channel adapter and its current route; Heartbeat does not automatically broadcast to every configured channel.
Troubleshooting
| Symptom | Check |
|---|---|
Status remains unknown | Confirm the Gateway is running and wait beyond one tick interval |
| Heartbeat is disabled unexpectedly | Inspect the active Profile's configuration, not another Profile |
| Same failure seems repeated | Check whether the Cron job's last-run signature changed between attempts |
| Notification names a failed job | Inspect that Cron job's status and history; Heartbeat is only the detector |
heartbeat tick is rejected | Only heartbeat status is public in the current CLI |