Skip to main content

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

SettingDefault
EnabledYes
Tick interval1 minute
Failure cooldown15 minutes
Delivery targetGateway event bus
Role / WorkspaceProfile 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.

Fix the Cron job, not the notification

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

SymptomCheck
Status remains unknownConfirm the Gateway is running and wait beyond one tick interval
Heartbeat is disabled unexpectedlyInspect the active Profile's configuration, not another Profile
Same failure seems repeatedCheck whether the Cron job's last-run signature changed between attempts
Notification names a failed jobInspect that Cron job's status and history; Heartbeat is only the detector
heartbeat tick is rejectedOnly heartbeat status is public in the current CLI