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
| Feature | Gateway Crons | Sentinel Watchers | Native Scheduler |
|---|---|---|---|
| Trigger | Time-based (cron/interval) | Condition-based (endpoint polling) | Time-based (calendar/interval) |
| Execution | Isolated AI agent session | Webhook → agent callback | Script/command (no AI) |
| Model cost | Per-run (full LLM call) | Only on trigger (condition met) | Zero (no LLM) |
| Best for | Periodic AI tasks (briefings, reviews) | Monitoring (prices, API health, chain events) | Non-AI automation (backups, sync) |
| Failure handling | Circuit breaker protocol | Retry with backoff | OS-level restart policies |
| State | Stateless (each run is fresh) | Tracks condition state across polls | Script 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.
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
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
- Gateway Crons — Configuration, circuit breakers, light context, and cost optimization
- Sentinel Watchers — Condition-based monitoring with zero polling cost
- Native Scheduler — OS-level jobs for non-AI automation
- Scout / Dispatch — Cheap scout → expensive actor pattern for cron cost reduction