Skip to content

Scheduling & Automation

Autonomous agents need things to happen without human prompting — email checks, governance scans, heartbeats, price alerts, file backups. There are three fundamentally different tools for this, each with different cost profiles, capabilities, and failure modes. Choosing the wrong one wastes money or misses events.

The Three Scheduling Systems

FeatureGateway CronsSentinel WatchersNative Scheduler
TriggerTime-based (cron/interval)Condition-based (endpoint polling)Time-based (calendar/interval)
ExecutionIsolated AI agent sessionWebhook → agent callbackScript/command (no AI)
Model costPer-run (full LLM call)Only on trigger (condition met)Zero (no LLM)
Best forPeriodic AI tasks (briefings, reviews)Monitoring (prices, API health, chain events)Non-AI automation (backups, sync)
Failure handlingCircuit breaker protocolRetry with backoffOS-level restart policies
StateStateless (each run is fresh)Tracks condition state across pollsScript manages own state

Gateway Crons

OpenClaw's built-in cron system. Each job spawns an isolated agentTurn session on a schedule. The agent wakes up, reads context, does work, exits. No state carries between runs.

When to use: Tasks requiring LLM reasoning — interpreting email, analyzing proposals, writing summaries, making judgment calls.

Cost implication: Every run is a full LLM API call, even when nothing happened. For high-frequency checks where 90% of runs find nothing, consider the scout/dispatch pattern or switching to a sentinel watcher.

Gateway Crons — Deep Dive

Sentinel Watchers

Event-driven monitoring that polls endpoints and fires webhooks when conditions change. No LLM involved in the polling loop — the sentinel checks a condition and only triggers an agent callback when met.

When to use: Monitoring external state where you want condition-based triggers. Price crossing a threshold, an API returning an error, a blockchain event, a GitHub check completing.

Cost implication: Zero LLM cost during polling. Model only runs when the condition fires. For monitoring tasks, this is dramatically cheaper than a gateway cron that checks the same endpoint every 15 minutes.

OpenClaw includes a built-in sentinel plugin. For blockchain-specific monitoring, tools like etherscan CLIs provide account, contract, gas, and event log queries that pair well with sentinel evm-call strategy for on-chain condition monitoring.

Sentinel Watchers — Deep Dive

Native Scheduler (launchd / systemd)

OS-level scheduled jobs that run scripts directly. No gateway, no LLM, no agent session.

When to use: Non-AI tasks that don't need model reasoning — git sync, file backup, data collection, log rotation, health checks.

Cost implication: Zero. Just runs a script. Use this for anything that can be expressed as a shell command without needing an LLM to interpret results.

OpenClaw's native scheduler plugin (native_scheduler tool) manages launchd/systemd jobs with wrapper metadata, failure callbacks, and result delivery — bridging the gap between OS-level scheduling and agent-aware infrastructure.

Native Scheduler — Deep Dive

Choosing the Right System

DiagramDiagram

The token savings are real. A gateway cron running every 15 minutes costs ~96 LLM calls/day. If 90% find nothing:

  • Without optimization: 96 full LLM calls/day
  • With scout/dispatch: ~10 expensive calls + 86 cheap scouts
  • With sentinel watcher: ~10 callbacks (only when conditions change)
  • With native scheduler: 0 LLM calls (if no AI reasoning needed)

What's Here

Built with OpenClaw 🤖