Tips for using Cron jobs and Heartbeat in OpenClaw to improve efficiency and reduce token usage, with examples of when to use each.
I see a few questions around inconsistency of execution with Cron jobs, so I thought I would layout some tips for efficiency to help consistency of execution as well as to help keep token usage down when running Cron jobs. I run OpenClaw instances across a number of different businesses that I am involved with, and in some cases there are multiple OpenClaw instances within the same company, running across various segments of the business. This is where defining the line between Heartbeat and Cron makes a big difference. **Heartbeat vs Cron** For those who are newer to OpenClaw, a Heartbeat is a periodic agent wake-up or check-in. The agent will read context, see if anything needs doing then it either responds to a task or it sends a Heartbeak\_OK message to your logs and it goes back to sleep. A Cron job is a scheduled task trigger. It can be an isolated agent run (the default action in OpenClaw for a Cron job) OR you can schedule a plain shell command. The mistakes most of us make: treating Heartbeat as the default and Crons as advanced. It's the opposite. Cron should be your default, and Heartbeat is the exception. The second mistake is using an agent to execute a Cron versus using a shell command. Agentic actions cost tokens, shell commands don't, and the vast majority of Cron jobs only need shell commands. **Setting up Cron jobs** You don't have to use OpenClaw to *create* the cron. Tell your agent: "Write me a shell script that does X, then create a system cron that runs it every Y minutes and pipes the output to me via Discord/Telegram \[whichever you use\] only when the output is non-empty." This way the agent writes the script once (one LLM call), the system Cron runs forever for free, you only get pinged when there's actually something to look at. **Examples of Heartbeat vs Cron** Job: Soul Guardian integrity check Type: Cron, shell + diff Why: Pure file operation, no reasoning needed Job: ClawSec advisory feed Type: Cron, isolated agent run, weekly Why: Needs reasoning but not chat context Job: Weekly memory audit Type: Cron, isolated Why: Reads files, writes summary, exits Job: Daily morning briefing Type: Cron, isolated Why: Calendar + email + weather, one shot Job: "Watch the inbox + chime in if relevant" Type: Heartbeat Why: Needs conversational state Job: Long-running task monitoring (vibe coding or scraping or similar) Type: Heartbeat Why: Multi-signal batched check **Don't clutter your** **HEARTBEAT.md** Empty `HEARTBEAT.md` (or just comments) = your agent wakes up, sees nothing to do, and shuts up. Use this when you're moving jobs to Cron and want to keep your ambient costs down. **Final Thought** OpenClaw's superpower isn't that the agent is always awake. It's that the agent can write its own automation requirements and then get out of the way. Use the LLM where reasoning is needed, use Cron for everything else. I hope this helps some people out there - happy OpenClawing!
This article discusses the inefficiency of polling in OpenClaw agents and introduces a plugin that moves event detection outside the agent loop, resulting in significant reductions in source calls and token usage.
A comparison of token consumption across four agent runtimes (Claude Code, OpenClaw, Hermes, and OpenClacky) on the same tasks reveals costs ranging from 0.8x to 4x relative to Claude Code, driven by differences in cache architecture and tool schema design.
The article critiques current browser AI agents for inefficiency due to repeatedly parsing and reasoning about the same websites, and proposes a model where agents reuse proven interaction paths to reduce token consumption and improve speed.
A 13-week recap of using OpenClaw as a daily AI agent on a Raspberry Pi, highlighting strengths like cron-based automation and memory curation, and pain points like model config issues and subagent orchestration.
The author describes challenges in supervising multiple long-running OpenClaw workflows, noting that workflow organization became harder than setup as usage scales.