heartbeat-config

heartbeat-config is a cursor rule for coding agents from mergisi/openclaw-rules. It costs 580 tokens per session, scanned A, original, MIT.

A rule for scheduling OpenClaw agent tasks with cron, the standard system for running commands at specified times or intervals. It says scheduled jobs belong in the cron jobs configuration.

In plain words
What is it for?
Use it when setting up recurring agent turns, such as daily reports, weekday tasks, or jobs that run every few minutes or hours.
Why use it?
It prevents scheduled work from being configured through the wrong mechanism and defines where the schedule and delivery settings live.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mergisi/openclaw-rules/heartbeat-config
Clone the repo
git clone --depth 1 https://github.com/mergisi/openclaw-rules

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for heartbeat-config

README.md
[![agentmods](https://agentmods.dev/badge/rules/mergisi/openclaw-rules/heartbeat-config.svg)](https://agentmods.dev/rules/mergisi/openclaw-rules/heartbeat-config)
Your own site
<a href="https://agentmods.dev/rules/mergisi/openclaw-rules/heartbeat-config"><img src="https://agentmods.dev/badge/rules/mergisi/openclaw-rules/heartbeat-config.svg" alt="Measured on agentmods" height="20"></a>
Per session 580 This file is loaded in full into every session.
When invoked 580 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00580 $0.00580
Opus 5 $0.00290 $0.00290
Sonnet 5 $0.00116 $0.00116
Haiku 4.5 $0.00058 $0.00058

Measured 4d ago against content hash b0ace2de3212, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

heartbeat-config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

project-rules/heartbeat-config.mdc · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Heartbeat & Scheduled Tasks

When configuring scheduled tasks for OpenClaw agents, use the cron jobs system.

Cron Jobs Configuration

Scheduled tasks live in ~/.openclaw/cron/jobs.json:

{
  "version": 1,
  "jobs": [
    {
      "id": "unique-uuid",
      "agentId": "main",
      "name": "Daily Morning Report",
      "enabled": true,
      "schedule": {
        "kind": "cron",
        "expr": "0 9 * * *",
        "tz": "Europe/Istanbul"
      },
      "sessionTarget": "isolated",
      "wakeMode": "now",
      "payload": {
        "kind": "agentTurn",
        "message": "Generate the daily morning report. Include GA4 traffic, Stripe revenue, and top pages.",
        "timeoutSeconds": 120
      },
      "delivery": {
        "mode": "announce"
      }
    }
  ]
}

Common Cron Patterns

Pattern Schedule
0 9 * * * Every day at 9:00 AM
0 9,18 * * * Twice daily at 9 AM and 6 PM
*/30 * * * * Every 30 minutes
0 */2 * * * Every 2 hours
0 9 * * 1-5 Weekdays at 9 AM
0 9 * * 1 Every Monday at 9 AM

Key Fields

  • agentId: Which agent handles this job. Usually "main".
  • sessionTarget: "isolated" creates a fresh session. Use this for reports.
  • wakeMode: "now" triggers immediately at scheduled time.
  • delivery.mode: "announce" sends output to Telegram.
  • timeoutSeconds: Max execution time. 120s for reports, 60s for quick checks.

Best Practices

  • Keep message payloads specific. "Generate report" is vague. "Run node tools/ga4-report.cjs and send results" is clear.
  • Use "isolated" sessions for scheduled tasks so they don't pollute the main conversation.
  • Set reasonable timeouts. API calls can be slow — 120s is safe for most reports.
  • Always include timezone. Cron runs in UTC by default.
  • Restart gateway after editing jobs.json: openclaw gateway restart

Disabling Heartbeats

To disable all scheduled tasks, set heartbeat.interval: 0 in config.json and clear jobs.json:

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 72 lines · 580 tokens per session scan A b0ace2de3212

Subscribe to this mod's changes

heartbeat-config is a cursor rule published in the GitHub repository mergisi/openclaw-rules (2 stars, last pushed 6mo ago), licensed MIT. It adds 580 tokens to every session, about $0.0029 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.