← Back to Automations
OpenClaw automations

Cron vs heartbeat: when to use each

Use this page when you need to choose between exact-time scheduling and context-aware periodic work in OpenClaw.

Start with one question Do you need exact timing, or do you need ongoing judgment?

Schedules, reminders, and bounded timed jobs

Cron is the right tool when the important thing is when the workflow fires.

  • reminders
  • scheduled summaries
  • daily or weekly reports
  • exact-time analysis or audit jobs

Check current reality, not just the clock

Heartbeat is better when the job should wake periodically, inspect the current situation, and decide whether anything needs action.

  • watchdogs
  • inbox checks
  • drift detection
  • background maintenance loops that should stay quiet when everything is healthy

The scheduler choice is only the first half

Main

--session main

Best for reminders and wakeups that belong in the main assistant flow.

Isolated

--session isolated

Best for dedicated jobs that should produce their own bounded result.

Persistent context

--session current or session:<id>

Best when recurring work should keep building on the same context over time.

Use the smallest correct execution style