Remote OpenClaw Blog
OpenClaw Automation and Scheduler System: The Complete Guide to Proactive AI Agents
What changed
This post was reviewed and updated to reflect current deployment, security hardening, and operations guidance.
What should operators know about OpenClaw Automation and Scheduler System: The Complete Guide to Proactive AI Agents?
Answer: Most AI agents sit around waiting for you to type something. They are reactive by design — you ask, they answer, and then they go back to sleep. That is fine for chat, but it is a terrible model for getting real work done. This guide covers practical deployment decisions, security controls, and operations steps to run OpenClaw,.
Learn how OpenClaw's heartbeat scheduler turns your AI agent from a passive assistant into a proactive workhorse. Step-by-step setup, 10 automation recipes, and best practices for running autonomous tasks 24/7.
Most AI agents sit around waiting for you to type something. They are reactive by design — you ask, they answer, and then they go back to sleep. That is fine for chat, but it is a terrible model for getting real work done.
OpenClaw flips that script. With its built-in heartbeat scheduler, your agent wakes itself up on a configurable interval, checks what needs doing, and handles it — no prompt required. That is the difference between a chatbot and an autonomous operator.
This guide covers everything: how the scheduler works under the hood, how to set up your first automated task, ten production-ready automation recipes, and the honest limitations you need to know before you go all-in.
Marketplace
Free skills and AI personas for OpenClaw — deploy a pre-built agent in 15 minutes.
Browse the Marketplace →Join the Community
Join 500+ OpenClaw operators sharing deployment guides, security configs, and workflow automations.
What Does OpenClaw Automation Actually Mean?
There are two modes an AI agent can operate in — reactive and proactive. Most platforms stop at reactive. OpenClaw supports both.
| Mode | How It Works | Example |
|---|---|---|
| Reactive | User sends a message, agent responds | "Summarize my emails" |
| Proactive | Agent wakes on schedule, performs tasks autonomously | Agent checks email every 30 minutes and flags urgent items |
The proactive side is powered by the heartbeat scheduler, and it is what makes OpenClaw genuinely useful for automation rather than just conversation.
Your agent runs on a Gateway process (port 18789 by default) that stays alive 24/7. It can execute terminal commands, read and write files, make API calls, and communicate across all major messaging channels — Telegram, Discord, Slack, and more. When the scheduler fires, the agent has full access to all of these capabilities, just as if you had manually prompted it.
How Does the Heartbeat Scheduler Work?
The heartbeat is exactly what it sounds like: a recurring pulse that wakes your agent at a set interval.
How It Works
- The Gateway process runs continuously on your server.
- At the configured interval (default: 30 minutes), the scheduler triggers.
- The agent wakes up and consults its memory files —
soul.mdandmemory.md— to determine what tasks are pending. - It executes those tasks using its available skills (defined as
.mdfiles). - Results are logged, notifications are sent through configured channels, and the agent goes back to sleep until the next heartbeat.
What Triggers It
The heartbeat is time-based, not event-based. It fires on a fixed interval regardless of whether anything has changed. This is intentional — it keeps the system simple and predictable. If you need event-driven triggers, you layer that logic into your skills.
Configurable Intervals
| Interval | Good For | Watch Out For |
|---|---|---|
| 5 minutes | Uptime monitoring, urgent inbox checking | High API costs, rate limits |
| 15 minutes | Lead follow-ups, social monitoring | Moderate cost |
| 30 minutes (default) | Email summaries, daily task management | Balanced sweet spot |
| 60 minutes | Report generation, content pipelines | Lower urgency only |
| 6-24 hours | Weekly digests, batch processing | Not suitable for time-sensitive work |
How Do You Set Up Your First Automated Task?
Here is a step-by-step walkthrough to get your first scheduled automation running.
Step 1: Make Sure Your Gateway Is Running
Your Gateway should be running 24/7 on port 18789. Verify it is active:
curl http://localhost:18789/health
Step 2: Define a Skill File
Skills are .md files that follow the SKILL.md format. Create a file that defines what your agent should do on each heartbeat:
# Skill: Morning Weather Check
## Trigger
Heartbeat — run once daily between 6:00 AM and 7:00 AM.
## Actions
1. Call the OpenWeatherMap API for the user's configured city.
2. Format a brief summary: high/low temps, precipitation chance, and any alerts.
3. Send the summary to the user's Telegram channel.
## Notes
- Skip if already sent today (check memory.md for last run timestamp).
- Use metric or imperial based on user preference in soul.md.
Step 3: Register the Skill
Place the skill file in your agent's skills directory. The agent will automatically pick it up on the next heartbeat cycle.
Step 4: Configure Your Heartbeat Interval
Set the interval that makes sense for your task. For a morning briefing, a 30-minute or 60-minute heartbeat is fine — the skill itself handles the time-window logic.
Step 5: Update soul.md With Task Instructions
Your soul.md is the agent's persistent identity and instruction set. Add a section that tells the agent to check for and execute scheduled tasks on each heartbeat:
## Scheduled Tasks
On each heartbeat, check the skills directory for tasks that match the current time window. Execute them in priority order. Log results to memory.md.
Step 6: Monitor and Iterate
Check your memory.md file and messaging channel for outputs. Adjust the skill logic as needed.
What Are the Best OpenClaw Automation Recipes?
These are production-tested patterns. Each one can be implemented as a skill file and triggered by the heartbeat scheduler.
1. Morning Briefing
What it does: Aggregates news headlines, calendar events, and weather data, then sends a formatted summary to Telegram every morning.
2. Inbox Monitoring
What it does: Checks email via IMAP or Gmail API, flags urgent items based on sender or keyword rules, and sends a summary of anything that needs attention.
3. Social Media Posting
What it does: Posts pre-scheduled content across platforms at optimal times.
4. Lead Follow-Up Reminders
What it does: Checks your CRM for leads that have not been contacted within a set window and sends nudge reminders.
5. Daily Standup Prep
What it does: Pulls recent git commits, Jira/Linear ticket updates, and formats a standup summary for Slack.
6. Invoice and Payment Reminders
What it does: Checks for outstanding invoices and sends follow-up messages to clients with escalating tone based on age.
7. Competitor Monitoring
What it does: Checks competitor websites and social media for changes and compiles a weekly report.
8. Server and Uptime Monitoring
What it does: Pings your endpoints and alerts you immediately on failures. Set your heartbeat to 5 minutes for this recipe.
9. Content Pipeline
What it does: Manages a draft-to-review-to-publish workflow for blog posts or social content.
10. Weekly Report Generation
What it does: Aggregates data from multiple sources on Friday at 4 PM, formats a report with week-over-week comparisons, and sends it to stakeholders.
When Should You Use Heartbeat vs Cron?
The heartbeat scheduler is simple by design. But sometimes you need more precision.
| Feature | Heartbeat Scheduler | Traditional Cron |
|---|---|---|
| Scheduling precision | Interval-based (every N minutes) | Exact time-based (e.g., "at 9:15 AM on weekdays") |
| Configuration | Single interval setting | Full cron expression syntax |
| Time-window logic | Handled in skill files | Handled by cron itself |
| Complexity | Low | Medium |
| Best for | Polling tasks, monitoring, periodic checks | Exact-time tasks, complex schedules |
| Built into OpenClaw | Yes | No (use OS-level cron to trigger agent) |
Rule of thumb: Use the heartbeat for anything that needs to run "roughly every X minutes." Use OS-level cron when you need exact scheduling like "every Tuesday at 9:00 AM."
How Do You Combine Skills and Scheduler for Complex Workflows?
The real power shows up when you chain skills together. Your soul.md can define workflows that span multiple heartbeat cycles:
- Heartbeat 1: Skill A checks for new data and writes results to a staging file.
- Heartbeat 2: Skill B reads the staging file, processes the data, and writes a draft report.
- Heartbeat 3: Skill C reviews the draft, applies formatting, and publishes.
Memory persistence (memory.md) is the glue. Each skill reads and writes state to memory, so the agent knows where it left off. This turns a simple interval timer into a multi-step workflow engine.
What Are the Limitations and Gotchas?
Let us be honest about the rough edges.
API Costs Add Up Fast
Every heartbeat cycle that calls external APIs costs money. A 5-minute interval hitting the OpenAI API, a weather API, and a news API is 288 cycles per day. Even at fractions of a cent per call, that adds up.
Rate Limits
Most APIs have rate limits. Your agent does not inherently know about them. Build rate-limit awareness into your skills.
Error Handling Is On You
If a skill fails (API timeout, malformed data, auth token expired), the heartbeat does not automatically retry or alert you unless you build that into the skill.
No Native Event-Driven Triggers
The heartbeat is purely time-based. It cannot fire on events like "new email arrived" or "webhook received." You can approximate event-driven behavior by polling frequently, but it is not the same.
Long-Running Tasks Can Overlap
If a task takes longer than your heartbeat interval, the next heartbeat might fire while the previous one is still running. Design your skills to be idempotent and use memory locks where needed.
How Does OpenClaw Scheduler Compare to Hermes Agent?
| Feature | OpenClaw Heartbeat | Hermes Agent Cron |
|---|---|---|
| Schedule definition | Fixed interval in config | Natural language ("every weekday at 9am") |
| Precision | Interval-based | Exact cron-level |
| Parallel execution | Sequential by default | Parallel subagents |
| Flexibility | Moderate | High |
| Complexity | Low | Higher (more moving parts) |
| Best for | Simple polling and periodic tasks | Complex, time-precise, multi-agent workflows |
Bottom line: OpenClaw's heartbeat is simpler to set up and great for straightforward automations. Hermes Agent gives you more scheduling flexibility and parallel execution, but requires more infrastructure management.
What Are the Best Practices for Automation?
Start Small
Do not automate ten things on day one. Start with one simple skill, run it for a week, and iron out the bugs before adding more.
Monitor Costs
Track your API usage weekly. Set budget alerts with your API providers. A runaway automation can burn through credits fast.
Set Boundaries in soul.md
Your soul.md should explicitly define what the agent is and is not allowed to do autonomously — never send external emails without human approval, never make purchases, never delete files outside the workspace directory.
Use Memory Strategically
Do not dump everything into memory.md. Structure it with clear sections and timestamps. Periodically clean it up to prevent context bloat.
Build in Notifications
Every automated skill should notify you of its results, especially failures. Silent automations are dangerous.
Test Skills Manually First
Before putting a skill on the scheduler, trigger it manually and verify the output.
Frequently Asked Questions
What happens if my server restarts — does the scheduler resume automatically?
It depends on your deployment. If you are running the Gateway as a systemd service or in Docker with a restart policy, yes — it comes back up and the heartbeat resumes from the configured interval. If you are running it as a bare process, you will need to restart it manually. Always use a process manager for production.
Can I run multiple heartbeat intervals for different tasks?
Not natively. The heartbeat fires at one global interval. However, your skills can implement their own timing logic — for example, "only run this skill if 6 hours have passed since the last execution" by checking timestamps in memory.md.
Does the agent use tokens on every heartbeat even if there is nothing to do?
Yes. Each heartbeat cycle involves the agent reading its instructions and deciding whether to act. This consumes a baseline number of tokens even on "empty" cycles. Keep this in mind when setting short intervals.
What is the minimum safe heartbeat interval?
It depends on your API budget and rate limits. For most use cases, 15 minutes is a reasonable minimum. Going below 5 minutes is rarely justified unless you are doing uptime monitoring for production systems.
How does memory persistence work across heartbeat cycles?
The agent reads soul.md (its identity and instructions) and memory.md (its working memory) at the start of every cycle. Any changes written to memory.md during a cycle are available on the next one. This is how the agent maintains state, tracks task completion, and manages multi-step workflows across heartbeats.
*Last updated: March 2026. Published by the Remote OpenClaw team at remoteopenclaw.com.*
