Automation & Tasks (OpenClaw Docs)

Source: https://docs.openclaw.ai/automation

Summary

Overview page for OpenClaw's automation and task system. Documents six distinct mechanisms and a decision guide for choosing between them.

Six Mechanisms

Mechanism Description
Scheduled Tasks (Cron) Gateway's built-in scheduler; persists jobs, awakens agents at designated times, routes output to chat channels or webhooks. Supports recurring expressions, one-shot reminders, and inbound webhook triggers.
Background Tasks Append-only ledger recording detached work: ACP runs, subagent spawns, cron executions, CLI operations. Inspected via openclaw tasks list. Not a scheduler — audit log only.
Task Flow Orchestration layer for multi-step workflows: durable execution, managed/mirrored sync modes, revision tracking. Inspected via openclaw tasks flow.
Standing Orders Persistent agent directives in workspace files (typically AGENTS.md), automatically injected into each session. Establishes permanent operating authority for defined programs.
Hooks Event-driven scripts triggered by agent lifecycle events: session init, resets, stops, compaction, tool calls. Auto-discovered from directories; managed via openclaw hooks.
Heartbeat Periodic main-session turn (default 30 min) batching routine checks without creating task records. Driven by HEARTBEAT.md checklist or tasks: blocks for conditional checks.

Decision Guide

Need Mechanism
Exact timing Cron
Flexible periodic monitoring Heartbeat
Track / audit detached work Background Tasks
Multi-step workflow orchestration Task Flow
React to lifecycle events Hooks
Persistent per-session instructions Standing Orders

Integration

These mechanisms are complementary, not exclusive: Cron handles precise schedules → creates Background Task records; Heartbeat handles routine monitoring; Hooks react to events; Standing Orders provide persistent context; Task Flow coordinates multi-step work; Background Tasks audit all of the above.