Day 6
OpenClaw Heartbeat & Cron: Set Up Proactive AI Automation
Enable heartbeat for always-on monitoring, configure cron schedules, and set up memory logging. Turn OpenClaw from reactive to proactive.
"An assistant you have to ask is just a tool. An assistant that proactively reaches out — that's a real assistant."
Today's Goal
| Learn | how heartbeat, cron, and memory turn OpenClaw into a proactive assistant |
| Do | create one heartbeat rule, add one morning cron, and verify both are active |
| Done when | openclaw system heartbeat last and openclaw cron list both show the setup you created today |
The Missing Piece
Your assistant has a soul, knows you, reads email, manages calendar, searches the web, runs Skills. But it has one critical limitation: if you don't talk to it, nothing happens.
50 emails piled up. It doesn't check. A meeting starting in 30 minutes. No reminder. Your site went down. No alert.
It's like hiring a capable person who just stands at the door waiting for instructions — if you don't ask, they do nothing. That's not a butler. That's a statue.
Today we solve this.
Heartbeat: Your Assistant's Biological Clock
The heartbeat mechanism sends a signal to your assistant at a regular interval (default: 30 minutes). When it receives the signal, it:
- Reads the task list in
HEARTBEAT.md - Runs each check
- Sends a message if something needs your attention
- If nothing, quietly returns
HEARTBEAT_OKand goes back to sleep
Edit ~/.openclaw/workspace/HEARTBEAT.md to define what it checks each time:
## Check Every Heartbeat
- Gmail: any emails marked important or needing reply
- Calendar: meetings starting within 2 hours
## Check 2-3 Times Daily
- Is my site accessible?
- Any unusual GSC traffic fluctuations?
## Don't Check Unless I Ask
- Weather (not needed proactively)
- Social media (unless I'm @mentioned)Interval options: 15 min (intense workday), 30 min (default balance), 1 hour (economical/off-hours). Configure via openclaw.json key agents.defaults.heartbeat.every (e.g. "30m", "1h", "15m").
Token cost guide:
- 15 min heartbeat: ~$8-15/month (heavy usage)
- 30 min heartbeat: ~$4-8/month (recommended)
- 1 hour heartbeat: ~$2-4/month (light usage)
Adjust based on your model provider pricing.
If you need to stop proactive checks: openclaw system heartbeat disable / openclaw system heartbeat enable
Heartbeat vs Cron: when to use which →
Verification check: run openclaw system heartbeat last and confirm heartbeat is enabled and reading the rules you just defined in ~/.openclaw/workspace/HEARTBEAT.md.
Minimum Day 6 Setup
This is the smallest working setup worth doing today:
Step 1: Create ~/.openclaw/workspace/HEARTBEAT.md with one rule:
Check Gmail for emails marked important. Notify me if any found.Enable heartbeat (if not already running):
openclaw system heartbeat enable
openclaw system heartbeat last # Should show last heartbeat run timeTo change the interval: edit openclaw.json and set agents.defaults.heartbeat.every (e.g. "15m", "30m", "1h").
Step 2: Set up one morning briefing cron:
openclaw cron add --name "Morning" --cron "0 8 * * *" \
--system-event "Send me a morning briefing: important emails + today's calendar."Step 3: Verify both are registered:
openclaw system heartbeat last
openclaw cron listVerification check: openclaw system heartbeat last shows heartbeat enabled, and openclaw cron list shows a Morning entry scheduled for 0 8 * * *.
Cron: Precise Scheduling
Heartbeat is for "check every so often." Cron is for exact times:
# Morning briefing at 8am every day
openclaw cron add --name "Morning Briefing" --cron "0 8 * * *" \
--system-event "Generate morning briefing: important emails, today's calendar, any site anomalies. Compile into one message."
# Weekly report every Monday at 9am
openclaw cron add --name "Weekly Report" --cron "0 9 * * 1" \
--system-event "Summarize last week: key events, completed tasks, data changes, notable emails."
# Hydration reminder on weekdays
openclaw cron add --name "Break Reminder" --cron "0 10,12,14,16 * * 1-5" \
--system-event "Remind to get up, move, drink water. If working 2+ hours straight, make it stronger."Standard cron syntax — same as Linux crontab.
Cron jobs: full syntax reference and examples →
Verification check: run openclaw cron list and confirm each job name, cron expression, and system event match what you intended.
The Three-Layer Memory System
Once your assistant works proactively, it needs to remember what happened. OpenClaw uses three layers:
Layer 1 — Daily logs (~/.openclaw/workspace/memory/YYYY-MM-DD.md)
The assistant automatically writes what happened each day: what it checked, what it found, what you asked for, what it learned about your preferences.
Layer 2 — Long-term memory (~/.openclaw/workspace/MEMORY.md)
Every few days, it reviews recent daily logs and distills what's worth keeping permanently: your project names, work habits, which emails you always reply to immediately, patterns it's noticed.
Layer 3 — Soul memory (SOUL.md + USER.md)
The stable core: who you are, how you like to work. This doesn't change with dates — it defines the baseline everything else builds on.
The compounding effect: after a week, it knows more about your workflow than when you set it up. After a month, it anticipates what you need. The gap between a fresh install and a 6-month-old assistant is almost entirely memory.
Hooks: pre/post action automation →
Verification check: after a day of usage, confirm a daily log exists in ~/.openclaw/workspace/memory/, and review ~/.openclaw/workspace/MEMORY.md or SOUL.md to make sure long-term behavior still reflects how you want the assistant to act.
The Balance: Proactive Without Being Annoying
There's a fine line between useful and spammy.
Batch the unimportant. Important email → notify immediately. Regular email → save for morning briefing. Weather is nice today → no one needs to know.
Respect quiet hours. Write in SOUL.md: no messages 11pm–8am unless urgent. Reduce frequency on weekends.
Rule of thumb: 3–5 proactive messages per day is comfortable for most people. More than that and the value dilutes into noise.
All proactive behaviors are configured in HEARTBEAT.md and Cron — adjustable anytime. If something's too frequent, change the interval. If a check isn't useful, delete it.
Verification check: if you get more than a few low-value notifications in one day, lengthen the heartbeat interval or remove the noisy rule before leaving the setup running overnight.
Common Issues
- Heartbeat fires but no message received: check that your notification channel is still connected, then trigger a simple rule in
HEARTBEAT.mdthat should always produce a message. - Cron runs at the wrong time: verify the server time zone and confirm your cron expression matches that time zone, not your laptop's local clock.
- Too many notifications in the first day: this usually means your first rules are too broad. Narrow the rule, batch lower-priority updates into the morning briefing, or move heartbeat from 15 minutes to 30 or 60.
What This Looks Like Running
A fully configured Day 6 setup runs like this without you doing anything:
- 8:00am — Morning briefing arrives in Telegram. One message, everything you need to know.
- 10:30am — Heartbeat check found nothing notable. Silent.
- 11:50am — "Meeting in 1 hour: Product Discussion. Found 3 related email threads — want me to prep a brief?"
- 3:00pm — Heartbeat detected your site had a 30% traffic drop. You get an alert.
- 9:00pm — Daily log written.
~/.openclaw/workspace/MEMORY.mdupdated. Everything it learned today stored for tomorrow.
You didn't open any apps. You didn't ask any questions. It just worked.
That's the point.