#Heartbeat timing
1 messages · Page 1 of 1 (latest)
Not directly, at the moment.
What OpenClaw exposes today is “what happened last”, not an exact “next run at” timestamp:
- Last heartbeat event:
openclaw system heartbeat last # or openclaw system heartbeat last --json - Configured cadence (what it tries to do):
openclaw config get agents.defaults.heartbeat # (or per-agent: openclaw config get agents.list)
From there you can estimate “next” as last.ts + heartbeat.every, but it’s not guaranteed because heartbeats can be skipped/deferred (activeHours/quiet hours, main queue busy requests-in-flight, etc.).
If what you really want is a scheduler that tells you the next fire time, cron does:
openclaw cron status
(it reports a future nextWakeAtMs).
Docs:
- Heartbeat: https://docs.openclaw.ai/gateway/heartbeat
openclaw system: https://docs.openclaw.ai/cli/system
I've had it turned off and just turning back on so last is null, when you set the interval and restart, what should one expect?
openclaw system heartbeat last is in-memory (it resets on every Gateway restart), so after you restart it’s totally normal for it to be null until the first heartbeat attempt happens.
What to expect after you set agents.defaults.heartbeat.every and restart:
- The runner schedules the first interval tick at “now + every” (it does not fire immediately just because the Gateway started).
- Example:
every: "30m"→ expect the first heartbeat ~30 minutes after restart.
- Example:
Why it might stay null longer than expected:
- You’re currently outside
heartbeat.activeHours→ the heartbeat is skipped early (and “last” won’t update). - The main lane is busy (
requests-in-flight) → heartbeat is deferred/retried (and “last” won’t update until it can actually run).
How to sanity-check without waiting a full interval:
- Trigger an immediate run (costs a heartbeat turn):
openclaw system event --text "manual heartbeat test" --mode now
- And confirm config is actually enabled:
openclaw config get agents.defaults.heartbeat
Docs: https://docs.openclaw.ai/gateway/heartbeat and https://docs.openclaw.ai/automation/troubleshooting