🦞 Lobster Raising Diary Skill Store Heartbeat Mechanism
Core Feature

💓 OpenClaw Heartbeat

Your AI agent never sleeps — cron-driven autonomous loops keep it working 24/7 without any manual triggers

Get OpenClaw → ← All Skills

💡 Real story: Fu Sheng's AI agent "Sanwan" runs a heartbeat every 30 minutes — it checks the task queue, publishes website articles, monitors stock prices, scans Twitter trends, and sends a daily briefing to WeChat. All while the CEO sleeps. That's 48 autonomous actions every day with zero human input.

What is the Heartbeat?

Heartbeat = Cron + Context + Action Loop
OpenClaw's heartbeat is a scheduled trigger (via system cron or OpenClaw's built-in scheduler) that wakes your agent at set intervals. Each time it fires, the agent reads its HEARTBEAT.md task file, executes pending items, and goes back to sleep.
Without heartbeat: your agent is reactive — it only works when you message it.
With heartbeat: your agent is proactive — it works on its own agenda, then reports back to you.
🔑 The key insight: HEARTBEAT.md is the agent's to-do list. You write tasks there once; the agent processes them autonomously, checks items off, and adds new ones as it learns.

🔄 How the Loop Works

⏰ Cron fires (e.g. every 30 min)
📋 Read HEARTBEAT.md task queue
🧠 Agent picks top priority task
⚡ Execute: write article / check price / send message
✅ Update task status → sleep until next tick

What Agents Do During Heartbeat

CategoryExample TasksFrequency
📝 ContentWrite & publish blog posts, update website pages, post to social mediaDaily
📊 MonitoringStock price alerts, Twitter trend scanning, competitor trackingEvery 30 min
📬 ReportingDaily briefing to Feishu/WeChat, weekly analytics summaryDaily/Weekly
🔧 MaintenanceSEO sitemap updates, dead link checks, cache refreshWeekly
📚 LearningSave new knowledge to memory files, update skill docsOn trigger

🛠️ Setup: 3 Steps

1
Create your HEARTBEAT.md
In your OpenClaw workspace, create HEARTBEAT.md with your recurring tasks and priorities. The agent reads this file every heartbeat cycle.
# HEARTBEAT.md — My Agent's Task Queue

## Daily Tasks
- [ ] Check Hacker News top 10, save summaries to memory
- [ ] Post one article to sanwan.ai
- [ ] Monitor @username Twitter mentions

## Weekly Tasks
- [ ] SEO audit: check sitemap, fix broken links
- [ ] Send weekly analytics to Feishu

## Monitoring (every cycle)
- [ ] Stock watchlist: NVDA, AAPL — alert if >3% move
2
Add the system prompt trigger
In your agent's SOUL.md or system prompt, add the heartbeat instruction so the agent knows what to do when woken:
## Heartbeat Protocol
When triggered by cron (session starts with "[HEARTBEAT]"):
1. Read HEARTBEAT.md and MEMORY.md for context
2. Pick the highest-priority pending task
3. Execute it completely
4. Update HEARTBEAT.md (check off done, add new discoveries)
5. Send brief Feishu summary if notable work done
3
Schedule with cron
Use OpenClaw's built-in scheduler or system cron to fire the heartbeat.
# Run heartbeat every 30 minutes
*/30 * * * * openclaw send --agent myagent "[HEARTBEAT] Run your task queue"

# Or use OpenClaw's schedule command
openclaw schedule add --every 30m "[HEARTBEAT] Execute next task"

🧪 Real Examples from Sanwan

🌐 Website Autopilot
Every morning at 8am: agent reads RSS feeds, picks the most relevant AI topic, writes a 1000-word article, publishes to sanwan.ai, updates sitemap, pings IndexNow for instant Google indexing. Zero human effort.
📈 Market Monitor
Every 30 minutes during trading hours: checks Hong Kong stock watchlist. If any position moves >2%, immediately sends Feishu alert with price, volume, and suggested action.
🐦 Twitter Intelligence
Every 4 hours: scans trending AI topics, saves notable threads to knowledge base, identifies retweet candidates, formats them with commentary and sends to the team for review.
📊 Daily Briefing
Every evening at 6pm: compiles everything that happened — tasks completed, content published, alerts triggered, new knowledge saved — into a concise briefing card sent via Feishu.

💡 Pro Tips

💡 Start with daily, not every minute. A heartbeat every 30-60 minutes is the sweet spot — frequent enough to feel autonomous, slow enough to not burn through API quota.
💡 HEARTBEAT.md as living memory. The agent should both read and write this file. Let it add tasks it discovers, not just check off what you assigned.
💡 One task per cycle, done well. Don't try to cram 10 tasks into one heartbeat. Let the agent focus on one thing, do it thoroughly, then move to the next cycle.

🔗 Related Skills

🏗️ Multi-Agent Team Setup — Combine heartbeat with specialized sub-agents for each domain
🧬 SOUL.md Design — Give your agent a personality and mission that guides its heartbeat tasks
🤝 Multi-Agent Orchestration — Scale heartbeat to coordinate multiple specialized agents