mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
b23c7bd0f8
Each legacy heartbeat tasks: entry becomes an editable system-created cron job (declaration key heartbeat-task:<agentId>:<hash>, per-occurrence identity for duplicate names) that fires a guarded heartbeat wake carrying the task prompt plus current monitor scratch context. Task cadence is now independent of the base heartbeat interval; active-hours, busy-retry, min-spacing, and flood guards are preserved, deferred payload-carrying wakes are retained and retried after the spacing floor, and colliding task/event wakes cannot starve each other. openclaw doctor --fix migrates existing blocks: async parse/plan, then one synchronous SQLite transaction that rereads the pinned scratch revision, upserts job rows, and strips the tasks: block atomically — concurrent doctors serialize on the database and a losing run aborts untouched. Orphan fields, invalid intervals, and incomplete entries block migration of their block with a clear finding instead of silent text loss. The runtime tasks: parser is deleted; leftover text is ordinary scratch prose. Nine Codex gpt-5.6-sol xhigh autoreview cycles; final verdict clean.
30 lines
1.3 KiB
Markdown
30 lines
1.3 KiB
Markdown
---
|
|
summary: "Workspace template for HEARTBEAT.md"
|
|
title: "HEARTBEAT.md template"
|
|
read_when:
|
|
- Bootstrapping a workspace manually
|
|
---
|
|
|
|
# HEARTBEAT.md template
|
|
|
|
`HEARTBEAT.md` lives in the agent workspace and holds the periodic heartbeat checklist. Keep it empty, or with only whitespace, Markdown comments, ATX headings, empty list stubs (`- `, `* [ ]`), or fence markers, to make OpenClaw skip the heartbeat model call entirely (`reason=empty-heartbeat-file`).
|
|
|
|
Shipped default content:
|
|
|
|
```markdown
|
|
<!-- Heartbeat template; comments-only content prevents scheduled heartbeat API calls. -->
|
|
|
|
# Keep this file empty (or with only comments) to skip heartbeat API calls.
|
|
|
|
# Add a short checklist below when the heartbeat should inspect shared context.
|
|
```
|
|
|
|
Add a short checklist below the comment lines only when one heartbeat turn should inspect the items together. Keep it small: heartbeat runs read this file every tick (default every 30 minutes), so bloated instructions burn tokens on every wake.
|
|
|
|
For independently scheduled or due-only checks, create [cron jobs](/automation/cron-jobs). Heartbeat scratch no longer supports scheduler syntax. Run `openclaw doctor --fix` to convert older `tasks:` blocks.
|
|
|
|
## Related
|
|
|
|
- [Heartbeat](/gateway/heartbeat)
|
|
- [Heartbeat config](/gateway/config-agents)
|