Back to Blog
Automation

Using heartbeats and cron automation

OpenClaw can run tasks on a schedule with heartbeats and cron-style jobs, daily digests, backups, and follow-ups without you asking. A US-focused guide to setting them up and measuring that they run.

MW

Marcus Webb

Head of Engineering

February 23, 202612 min read

Using heartbeats and cron automation

Heartbeats and cron in OpenClaw let US users run tasks on a schedule, daily summaries, weekly backups, or "every hour check X." You define the schedule and the task; the agent runs it without you being in the chat. This post covers how to set them up and how to confirm they're running and succeeding with event tracking (e.g., via SingleAnalytics)."

If you're in the US and want OpenClaw to do things without you asking every time: like a morning digest or a nightly backup: you use heartbeats or cron-style automation. The agent runs on a schedule you define, so automation is continuous, not only when you're in the chat. This guide explains how that works, what to run, and how to measure that scheduled tasks actually complete so you can trust the system, including with a unified analytics platform like SingleAnalytics.

What are heartbeats and cron in OpenClaw?

  • Heartbeat: A recurring trigger that fires at an interval (e.g., every 15 minutes, every day at 9 AM). When it fires, OpenClaw runs a task you've defined (e.g., "check inbox and summarize unread" or "run the daily report."
  • Cron: Same idea, but the schedule is expressed in cron syntax (e.g., 0 9 * * * for 9 AM daily). Gives you fine-grained control (e.g., "weekdays only" or "first of month").

In both cases, the agent doesn't wait for a user message; it wakes up on the schedule and executes. That's how you get "every day at 9 AM send me a summary" or "every night at 2 AM back up the project folder." For US users who need 24/7 automation, this is why running OpenClaw on a server (or a machine that's always on) matters: if the process is down, scheduled tasks don't run.

What to automate with heartbeats and cron

  • Daily digest: "At 9 AM, summarize my calendar and top 5 unread emails and send to Slack/WhatsApp."
  • Backups: "At 2 AM, run the backup skill for ~/Projects."
  • Follow-up checks: "Every weekday at 10 AM, list emails I said I'd follow up on and haven't."
  • Monitoring: "Every 15 minutes, check if X is up; if not, notify me."
  • Cleanup: "Every Sunday, archive inbox messages older than 14 days."
  • Reports: "Every Monday at 8 AM, generate the weekly standup summary."

Start with one or two schedules. Keep tasks idempotent where possible (running twice shouldn't double-send or double-delete). US teams that run many scheduled jobs often emit events (e.g., heartbeat_triggered, scheduled_task_completed, scheduled_task_failed) so they can see run history and success rate in one place. SingleAnalytics supports custom events so you can build a dashboard of "scheduled tasks by day" and "failure rate by job" without digging through logs.

How to set up (conceptual)

  1. Define the task. It might be a skill (e.g., run_daily_digest) or an internal command the agent knows how to run. Test it once manually so you know it works.
  2. Define the schedule. In OpenClaw's config or UI, add a heartbeat or cron entry: interval or cron expression, plus the task name or command.
  3. Ensure the process is always on. If you run locally, the machine must be on at the scheduled time (or use a server). If you run in the cloud, the instance or container must be running, many US users run OpenClaw on a small VPS or managed container so heartbeats fire reliably.
  4. Emit events. When the scheduled task runs, have the agent or skill emit an event (e.g., scheduled_task_started, scheduled_task_completed with job name and duration). On failure, emit scheduled_task_failed with reason. Send these to your analytics platform so you can see at a glance whether last night's backup or this morning's digest actually ran. SingleAnalytics lets you track these alongside product and agent events so you have one view of automation health.

Pitfalls to avoid

  • Over-scheduling. Too many frequent jobs can hit rate limits (email, APIs) or waste compute. Start sparse; add as needed.
  • Assuming it ran. Without event emission or logs, you won't know if a job was skipped (process down, crash) or failed. Emit and monitor so you're not flying blind.
  • Timezone. Schedules are often in server time. Set the server timezone to yours (e.g., America/Los_Angeles) or express the schedule in that zone so "9 AM" is your 9 AM.
  • Secrets and env. Scheduled tasks run without a user session. Ensure API keys and credentials are in env or a secrets manager so the task can authenticate.

Debugging missed runs

When a scheduled task doesn’t run, check in order: (1) Is the OpenClaw process running? (2) Is the server or machine on at the scheduled time (and in the right timezone)? (3) Did the task run but fail? (Check logs and events for scheduled_task_failed.) (4) Is the schedule expression correct (cron syntax or heartbeat interval)? Emitting heartbeat_triggered and scheduled_task_completed or scheduled_task_failed for every run gives you an audit trail: US teams that send these to SingleAnalytics can quickly see "last successful run" and "failure rate by job" without digging through log files.

Summary

Using heartbeats and cron with OpenClaw in the US lets you run tasks on a schedule: digests, backups, follow-ups, monitoring, so automation doesn't depend on you being in the chat. Set the schedule, keep the process running (local machine on or cloud instance), and emit events so you can see run history and success rate. When a run is missed, use events and logs to confirm process uptime, timezone, and task outcome. SingleAnalytics gives you one place to track those events with the rest of your product and agent data, so you know your scheduled automation is working.

OpenClawheartbeatcronschedulingUS

Ready to unify your analytics?

Replace GA4 and Mixpanel with one platform. Traffic intelligence, product analytics, and revenue attribution in a single workspace.

Free up to 10K events/month. No credit card required.