OpenClaw Advanced Usage

Cron vs Heartbeat — a 1-page brief distilled into a shareable single-page report.

OpenClaw Automation Cron Heartbeat
Report

TL;DR

  • Heartbeat = main-session periodic awareness + batching + context.
  • Cron = precise scheduling + optional isolation + delivery control.
  • Best setup: Heartbeat for routine checks; Cron for exact time / heavy / one-shot.

Decision rules

  1. Needs exact time? → Cron
  2. Needs isolation (don’t pollute main / different model)? → Cron (isolated)
  3. Can it batch with other periodic checks? → Heartbeat
  4. One-shot reminder? → Cron (--at)

Heartbeat best practices

  • Put multiple checks into HEARTBEAT.md so one turn batches email/calendar/notifications.
  • Use HEARTBEAT_OK suppression when nothing matters.
  • Good for drift-tolerant monitoring.

Cron best practices

  • Understand execution styles: main/systemEvent vs isolated/agentTurn.
  • Default delivery: short announce + store full artifacts on disk (avoid IM timeouts).
  • Use isolated jobs for heavy analysis and clean main-session history.

Main vs isolated (rule of thumb)

  • Need main session context (recent convo/project state) → main + systemEvent
  • Need isolation / heavy work / model override → isolated + agentTurn

Suggested starter defaults

  • Heartbeat: every 30m (batch checks + finish notifications).
  • Cron: daily/weekly reports (isolated + announce short) and one-shot reminders (main + systemEvent).

References