PlugAndClawGet Started →

OpenClaw Heartbeat Automation

Your AI assistant doesn't have to wait for you to ask. Heartbeats are OpenClaw's built-in scheduler - a system that sends standing orders to your assistant on a regular interval so it can check email, monitor prices, track uptime, and brief you every morning before you've had coffee.

How the Heartbeat System Works

Every 30 minutes (by default), OpenClaw sends a scheduled prompt to your AI assistant. This prompt - called a heartbeat - instructs the assistant to check HEARTBEAT.md for standing orders and execute any tasks that are due.

Your assistant reads HEARTBEAT.md, consults its internal state file to see what was last checked and when, and runs through the task list. Tasks that are due get executed. Tasks that aren't due yet get skipped. If something important is found - an urgent email, a site going down, a price change - the assistant sends you a message. If nothing needs attention, it replies with a quiet 'HEARTBEAT_OK' that doesn't ping your phone.

This is deliberately designed to minimize noise. You don't want notifications every 30 minutes saying 'all clear.' The assistant only reaches out when it has something worth saying. You can tune this threshold in HEARTBEAT.md itself: 'only message me if the email is marked urgent' or 'always send the morning briefing even if nothing new.'

The heartbeat scheduler is part of the OpenClaw runtime. It runs inside the same process as your assistant, with access to all the same tools and skills. A heartbeat can use the browser skill to check a website, the email tool to read your inbox, or any other installed skill - the same way you would manually ask your assistant to do these things.

Writing Your HEARTBEAT.md

HEARTBEAT.md is a plain markdown file you create in your OpenClaw workspace directory. Your assistant reads it on every heartbeat cycle and treats it as standing instructions.

The format is flexible - your assistant is an LLM, so plain English works fine. But structured instructions work best:

'Email check (every 30 min): Scan inbox for unread messages flagged urgent or from my boss. If found, summarize and message me.'

'Morning briefing (9am daily): Check calendar for today and tomorrow. Check weather for Rotterdam. Summarize in one message. Always send this even if nothing is new.'

'Competitor prices (every 2 hours): Open plugandclaw.com/pricing and simpleclaw.com/pricing. Note any changes since last check. Only message if something changed.'

'Site uptime (every 15 min): Fetch https://mysite.com. If response is not 200, message me immediately with the status code.'

Your assistant tracks last-check times in `memory/heartbeat-state.json`, a file it creates and maintains automatically. You never need to touch this file - it's the assistant's own bookkeeping.

Keep HEARTBEAT.md concise. Every heartbeat loads this file into context, so a 200-line HEARTBEAT.md burns tokens on every cycle. Aim for under 20 lines covering your most important standing tasks.

Real-World Automation Examples

Here are the automations PlugAndClaw users actually run on their heartbeat schedules.

Email triage is the most common. Your assistant checks your inbox every 30 minutes during business hours and summarizes anything that looks time-sensitive. You stop missing important emails while also not being buried in an inbox you have to monitor yourself. The assistant learns over time which senders and subjects matter to you.

Calendar briefings replace the habit of checking your calendar app. Every morning at 8am, your assistant sends you a message: 'You have 3 meetings today. First one is at 10am with the product team. Weather in Amsterdam is 12 degrees and rainy. Your next deadline is Thursday.' One message, no app-switching.

Competitor price monitoring is popular for SaaS founders. Your assistant loads competitor pricing pages every few hours using the Playwright browser skill, compares to the last known prices, and alerts you if anything changes. This kind of monitoring would otherwise cost hundreds per month through dedicated monitoring tools.

Website uptime checking is simple but valuable. A fetch to your domain every 15 minutes. If it doesn't return 200, you get an immediate alert. No third-party monitoring service needed, no monthly subscription - just your assistant doing a URL check on schedule.

Content idea capture: your assistant monitors a list of RSS feeds or search queries, flags anything published in the last 24 hours that matches your interests, and sends you a daily digest. Useful for staying on top of a niche without manually checking multiple sources.

Why This Requires 24/7 Cloud Hosting

The heartbeat system is only as reliable as the machine running it. If your OpenClaw instance is on your laptop, automations die the moment you close the lid, lose Wi-Fi, or restart for updates. Your morning briefing doesn't arrive because your computer was asleep. Your site goes down at 3am and you don't find out until 8am when someone emails you.

Cloud hosting solves this completely. A server in a data center runs continuously, with redundant power, redundant networking, and no sleep states. Your heartbeat fires every 30 minutes, every day, whether you're at your desk, in a meeting, asleep, or on vacation.

PlugAndClaw's dedicated Hetzner VPS runs your OpenClaw instance as a systemd service - the same service manager that runs critical Linux infrastructure. If your assistant crashes, systemd restarts it automatically. If the server reboots for a kernel update, your assistant comes back up within seconds. The uptime target is 99.9%, which works out to less than 9 hours of downtime per year.

The 24/7 requirement also applies to skills used in heartbeats. If your uptime check uses the Playwright browser skill, Chromium needs to be available at 3am. On PlugAndClaw, it always is. On your laptop, it might not be - the browser could have updates pending, or the display server might not be running in the background.

Getting Started with Heartbeat Automation on PlugAndClaw

When your PlugAndClaw server provisions, the heartbeat scheduler starts automatically. By default, it fires every 30 minutes and checks for a HEARTBEAT.md file. If none exists, it replies HEARTBEAT_OK and does nothing.

To activate heartbeat automation: SSH into your server or ask your Telegram assistant to create HEARTBEAT.md. Write your standing instructions. On the next heartbeat cycle, your assistant picks them up and starts working.

You can test immediately: ask your assistant via Telegram to 'run a heartbeat check right now.' It will execute HEARTBEAT.md tasks on demand so you can see what gets triggered before waiting for the scheduler.

The heartbeat interval is set in your openclaw.json configuration. Common settings are 15 minutes, 30 minutes, or 1 hour. Shorter intervals mean faster response to events but more token consumption. For most users, 30 minutes is the right balance - quick enough to catch urgent emails and site issues, slow enough not to burn through credits on routine checks.

Your PlugAndClaw plan includes $20 in monthly AI credits. A 30-minute heartbeat cycle with a brief HEARTBEAT.md uses roughly 200-400 tokens per cycle. At 48 cycles per day, that's under 20,000 tokens daily just for heartbeats - well within budget alongside normal conversational use. More complex heartbeat tasks that use browser skills or process large email volumes will use more, but you're always in control of what runs.

Frequently Asked Questions

What is an OpenClaw heartbeat?

A heartbeat is a scheduled poll where OpenClaw sends a prompt to your AI assistant at a regular interval - typically every 30 minutes. Your assistant reads the HEARTBEAT.md file in your workspace, checks what tasks are due, executes them, and either reports results or stays quiet if nothing needs attention. It's a lightweight cron-like system built into the OpenClaw architecture.

What is HEARTBEAT.md?

HEARTBEAT.md is a markdown file in your OpenClaw workspace that acts as your assistant's standing orders. You write what you want checked, how often, and what to do with results. For example: 'Every 30 minutes: check my email for urgent messages. Every morning at 9am: send me a calendar briefing. Every hour: check if my website returns 200 OK.' Your assistant reads this file on every heartbeat and follows the instructions.

Why does heartbeat automation require a 24/7 server?

Heartbeat automation only works if your OpenClaw instance is always running. If you run OpenClaw on your laptop, automations stop when you close the lid or the app. A cloud-hosted instance like PlugAndClaw runs continuously on a dedicated server, so your assistant checks emails at 2am, monitors competitor prices overnight, and sends you your morning briefing before you wake up - without any machine needing to be on.

How is heartbeat different from a cron job?

Cron jobs execute shell scripts at fixed times. Heartbeats execute AI reasoning. Your assistant doesn't just run a script - it reads your instructions, checks context from recent conversations, decides what's actually important, and composes a human-readable response. It can also chain tasks: check email, notice an urgent message, look up the sender's details, draft a reply suggestion, and send you one consolidated briefing. That kind of contextual chaining isn't possible with traditional cron.

Can I customize heartbeat frequency?

Yes. The default heartbeat interval is configurable in your openclaw.json settings. You can set the base interval (e.g., every 30 minutes), and within HEARTBEAT.md you can specify different frequencies for different tasks. Your assistant tracks what was last checked using a heartbeat-state.json file it maintains automatically, so it knows when each task is actually due.

Your AI assistant. Live in under 1 minute.

Start Automating Today

$39.50/month - 24/7 heartbeat automation - 7-day money-back guarantee