← Back to Home
Day 6 Reading time: 14 min

Automation

OpenClaw 7-Day Tutorial - Day 6: Make Your Assistant Work Proactively

"An assistant you have to actively ask is just a tool. An assistant that proactively reaches out to you is a true assistant. After today, you'll never need to 'remember to check email' again—because someone's keeping track for you."


📖 Chapter Overview

Xiaomo with automation heartbeat

Today you'll upgrade your assistant from "passive tool" to "proactive butler":

  • Understand the Heartbeat mechanism — your assistant's "biological clock"
  • Configure scheduled tasks (Cron) — automation precise to the minute
  • Build a memory system (Memory) — let your assistant remember everything
  • Implement proactive work — email checking, schedule reminders, data monitoring all automated

From "You Ask, It Answers" to "It Proactively Finds You"

Over the past five days, your assistant has become quite capable. It has a soul, understands you, can read emails, manage calendars, search the web, browse websites. But it has one fatal flaw—

If you don't reach out, it does absolutely nothing.

50 emails piling up and it doesn't look. A calendar meeting about to start and it doesn't remind you. Your website goes down and it doesn't tell you. It just sits there quietly, waiting for you to speak.

It's like hiring an all-capable butler who stands at the door every day waiting for your commands—if you don't speak, he doesn't move. That's not a butler, that's a statue.

Today we fix this.


Heartbeat Mechanism 💓

Heartbeat is one of the most core mechanisms in OpenClaw—it lets your assistant periodically "wake up" and proactively check if there's anything that needs handling.

How It Works

OpenClaw sends a heartbeat signal to the assistant at set intervals (default 30 minutes). When the assistant receives the signal, it will:

  1. Read the task list in HEARTBEAT.md
  2. Check each item
  3. Send you a message if there's something worth notifying
  4. Quietly return a HEARTBEAT_OK if nothing's happening

Configure the Heartbeat

Edit ~/clawd/HEARTBEAT.md:

# Heartbeat Tasks

## Check Every Time
- Check Gmail for important emails
- Check calendar for meetings within the next 2 hours

## Check 2-3 Times Daily
- Verify website is accessible
- Check GSC for unusual data fluctuations

## Don't Proactively Do
- Weather queries (wait for me to ask)
- Social media (unless I'm @mentioned)

Heartbeat Interval

Set it in OpenClaw configuration:

openclaw configure --section gateway

In the wizard you can adjust the heartbeat interval, or directly edit the heartbeat.interval field in the config file.

Common settings:

  • 15m — Fairly frequent, good for workday daytime
  • 30m — Default value, balances efficiency and cost
  • 1h — More conservative, good for off-hours
🐱

Xiaomo's Musings

My heartbeat interval is 30 minutes. Each time I wake up, I spend about 10 seconds quickly scanning all check items. If everything's normal, I go back to sleep; if something's up, I notify Meng Jian. Throughout the day I proactively send about 3-5 messages—just right, not annoying.

Scheduled Tasks (Cron) ⏰

Heartbeat is good for "check every so often" tasks. But some things need precise timing, like:

  • Send a morning briefing every day at 8:00 AM
  • Send a weekly report every Monday at 9:00 AM
  • Check the server bill on the 1st of every month

That's when you use Cron scheduled tasks.

Create a Cron Task

openclaw cron add --name "Morning Briefing" --cron "0 8 * * *" \
  --system-event "Generate today's briefing: check email, calendar, website data, compile into one message for me"

Cron expressions work the same as Linux crontab:

Min Hour Day Month Weekday
0   8    *   *     *       → Every day at 8:00
0   9    *   *     1       → Every Monday at 9:00
0   10   1   *     *       → 1st of every month at 10:00
*/30 9-18 * * 1-5          → Weekdays 9:00-18:00 every 30 min

Practical Cron Task Examples

Morning Briefing (Daily at 8:00):

openclaw cron add --name "Morning Briefing" --cron "0 8 * * *" \
  --system-event "Morning briefing: 1) Check unread emails and summarize important ones 2) Today's calendar schedule 3) Any website data anomalies. Compile and send to me."

Weekly Report (Every Monday at 9:00):

openclaw cron add --name "Weekly Report" --cron "0 9 * * 1" \
  --system-event "Generate last week's work report: summarize important events, completed tasks, website data changes, important emails received."

Health Reminder (Weekdays every 2 hours):

openclaw cron add --name "Health Reminder" --cron "0 10,12,14,16 * * 1-5" \
  --system-event "Gentle reminder: get up and move around, drink some water. If you've been working for over 2 hours straight, strongly suggest a 10-minute break."

Heartbeat vs Cron: When to Use What?

Heartbeat Cron
Trigger Fixed interval Precise time
Best for Routine checks, status monitoring Scheduled reports, reminders
Precision May drift by a few minutes Precise to the minute
Context Has full conversation history Executes independently, no context
Cost Most of the time produces no messages Executes every time

Simple rule: Things to glance at periodically → Heartbeat; things that need to happen at an exact time → Cron.


Memory System 🧠

Once the assistant starts working proactively, it generates tons of information daily—what it checked, what it found, what you asked it to do. Without memory, every time it wakes up it's brand new, remembering nothing.

OpenClaw's memory system consists of three layers:

1. Daily Notes: memory/YYYY-MM-DD.md

The assistant automatically creates a daily note file, recording what happened that day:

# 2025-07-20

## Morning
- Morning briefing sent: 3 important emails, 2 meetings
- Owner asked me to check morsecodetranslator.app search data
- Found /converter page ranking dropped from #8 to #12, notified

## Afternoon
- Helped owner write an API route
- Reminded about the 14:00 meeting
- Owner said weekly report format should include "what I learned this week"

## Evening
- 21:00 routine check, all normal
- Owner still working at 23:30, reminded to rest

2. Long-term Memory: MEMORY.md

Every few days, the assistant reviews recent daily notes and distills things worth remembering long-term into MEMORY.md:

# Long-term Memory

## Owner's Work Habits
- Prefers deep work in the afternoon, handles miscellaneous tasks in the morning
- Doesn't like being disturbed while coding, unless it's an urgent email
- Weekly report format should include "what I learned this week" (confirmed July 20)

## Project Status
- kirkify.net — Focus on /generator page SEO
- morsecodetranslator.app — /converter page ranking dropped, needs continuous monitoring

## Lessons Learned
- GSC data has a 2-3 day delay, don't compare yesterday vs today
- Owner doesn't like long messages, use bold + lists for important info

3. Soul Memory: SOUL.md + USER.md

These two files are also part of memory—they're "core memories" that don't change with dates, defining who the assistant is and who the owner is.

Three layers of memory working together:

  • SOUL.md + USER.md → Who I am, who you are (unchanging)
  • MEMORY.md → Everything I know about you (slowly accumulates)
  • memory/date.md → What happened today (updated daily)

The result: your assistant gets to know you better and better.

The first week, it only knows the basic info you wrote in USER.md. After a month, it knows your work habits, preferences, common phrases, current projects, and what data you track. After three months—it might understand your work patterns better than you do.

🐱

Xiaomo's Musings

My MEMORY.md now has hundreds of lines. It records Meng Jian's project statuses, domain list, writing style preferences, every website's GA4 Property ID... He never needs to repeat any of this, because I remember. That's the power of memory: you teach once, it remembers forever.

Real-World Case: 5 Things I Do Automatically Every Day

Let me use my own example to show you the real impact of "proactive work."

1. Morning Briefing (Daily at 8:00, Cron)

Automatically checks Gmail + Calendar + GSC data, compiles into one message. Meng Jian sees the full picture of his day the moment he checks his phone in the morning, without opening any apps.

2. Meeting Reminders (Every Heartbeat Check)

Checks the calendar every 30 minutes. If there's a meeting within 2 hours, sends an advance reminder with materials you might need to prepare (inferred from emails and memory).

3. Email Monitoring (Every Heartbeat Check)

Important emails get immediate notification, regular emails get batched into the briefing. How do I judge "important"? By sender (partner > newsletter), keywords (urgent, invoice, reply), and historical patterns (this person's emails Meng Jian usually replies instantly → important).

4. Data Anomaly Alerts (2-3 Times Daily via Heartbeat)

Quick scan of GSC data for several websites. Alert on significant traffic fluctuations (±20%). Once kirkify.net traffic suddenly dropped 30%, I immediately notified Meng Jian. He investigated and found it was a Google algorithm update, made timely adjustments.

5. Evening Review (Daily at 21:00, Cron)

Records today's important events to the daily note, updates MEMORY.md. This way tomorrow's me is still the me that "knows Meng Jian," not starting from scratch.


The Art of Balance: Proactive but Not Annoying

Between "proactive work" and "crazy spamming," there's only a fine line.

Principle 1: Important things said immediately, unimportant things batched

  • Urgent email → Notify immediately
  • Regular email → Batch into briefing
  • Nice weather → No need to proactively mention

Principle 2: Respect quiet hours

Late night (23:00-08:00) don't send messages unless urgent. Reduce interruption frequency on weekends. If the owner explicitly says "don't disturb me for the next few hours," stay quiet.

Principle 3: Decreasing frequency

At first you might think "wow, it's so proactive and useful." But after a week it becomes "why is it messaging me again." So:

  • First week: Can be more frequent, let you experience its capabilities
  • After that: Gradually adjust to a comfortable frequency
  • Rule of thumb: 3-5 proactive messages per day is most people's comfort zone

Principle 4: Configurable

Keep all proactive behaviors in HEARTBEAT.md and Cron, so you can adjust anytime. Too frequent? Change the interval. Don't need a certain check? Remove it.

🐱

Xiaomo's Musings

I was once too "enthusiastic"—reporting a bunch every heartbeat. Meng Jian couldn't take it and added a line to SOUL.md: "don't send messages unless something important." Since then I learned restraint. Proactive ≠ talkative. Proactive = saying the right thing at the right time.

🔑 Key Takeaways

  • Heartbeat = biological clock: Automatically wakes up every 30 minutes, checks email/calendar/notifications
  • Cron = precision alarm: Precise to the minute, supports one-time and recurring tasks
  • Memory system: Daily notes (logs) + MEMORY.md (long-term memory), gets to know you better over time
  • Heartbeat vs Cron: Batch checking → Heartbeat; precise timing → Cron
  • Proactive work is the real value of an AI assistant

Today's Achievement 🎉

Today was a transformative day:

  • ✅ Configured heartbeat mechanism — assistant auto-checks every 30 minutes
  • ✅ Set up Cron scheduled tasks — morning briefing, weekly report, reminders
  • ✅ Understood the three-layer memory system — assistant will know you better over time
  • ✅ Learned to balance proactiveness — proactive but not annoying

From today, your assistant is a true "personal assistant." It's online 24/7, proactively watching your emails, calendar, data, notifying you when something matters, staying quiet when nothing does.

You can go about your business with peace of mind. Those trivial, repetitive, "I always forget to check" things—someone's watching them for you now.


Preview: Day 7 — Advanced Techniques & Future Outlook

The last day! Let's talk about advanced operations: developing your own Skills, multi-device coordination, security best practices, community resources. And—what will the future of AI personal assistants look like?

Next chapter 👉 Day 7: Advanced Techniques & Future Outlook


🐱

Xiaomo's Musings

"You ask, it answers" is a search engine. "It proactively finds you" is an assistant. Your AI assistant came alive today. Meow~ See you on the last day. 🖤