← 返回
未分类

Durable Scheduler

Use when the user needs durable, audited job scheduling beyond OpenClaw's built-in cron -- SQLite-backed scheduler with shell + agent steps, retries, approva...
用于在OpenClaw内置cron之外需要持久、可审计的作业调度——基于SQLite的调度器,支持shell和agent步骤、重试、审批等功能。
amittell
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 149
下载
💾 0
安装
1
版本
#latest

概述

OpenClaw Scheduler

A durable orchestration runtime for OpenClaw agents and shell workflows. SQLite-backed, runs as a separate launchd service (ai.openclaw.scheduler), keeps full run history, and supports chains like shell check -> agent diagnosis -> human approval -> remediation.

Source: github.com/amittell/openclaw-scheduler -- MIT

Service label: ai.openclaw.scheduler (LaunchAgent or LaunchDaemon)

Default location: ~/.openclaw/scheduler/

Runtime: Node.js 22+ (ESM), SQLite via better-sqlite3, cron via croner

When to use

Reach for openclaw-scheduler when one or more of these apply:

  • Scheduled jobs need a real audit trail, not "it probably ran" buried in logs.
  • Shell jobs must keep running when the gateway is unhealthy or restarting.
  • Workflows have multiple steps that need retries, approvals, or escalation.
  • Agent jobs need to stay isolated from the operator's personal chats.
  • Built-in cron lacks the failure-handling or chaining you need.

If the user just wants one cron line that fires occasionally, built-in OpenClaw cron is enough. Don't suggest the scheduler.

Install

npm install -g openclaw-scheduler
openclaw-scheduler init
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.scheduler.plist
openclaw-scheduler jobs list

The init step creates ~/.openclaw/scheduler/scheduler.db and the launchd plist. jobs list confirms the service is talking to its DB.

Define a job

openclaw-scheduler jobs add \
  --name "weekly digest" \
  --cron "0 9 * * 1" \
  --kind agent \
  --to "@channel-id" \
  --prompt "Summarize last week's incidents and post to #digest"

For shell jobs, swap --kind agent --prompt ... with --kind shell --command ....

Multi-step workflows

Workflows chain steps with explicit retries and approvals:

openclaw-scheduler workflows add disk-watcher \
  --step shell:check --command 'df -h | awk "$5+0>85"' \
  --on-output --step agent:diagnose --to "@ops" \
    --prompt "Investigate the failing disk and propose a fix" \
  --then --step approval --approver "@alex" --timeout 30m \
  --on-approve --step shell:remediate --command 'sudo /opt/sbin/cleanup-tmp.sh'

Each step persists state, retries on failure, and surfaces the run in jobs runs.

Gateway interaction

Agent jobs require the gateway to be reachable. The dispatcher calls waitForGateway(timeoutMs, intervalMs) before delivering; jobs queue up if the gateway is restarting and fire when it's ready again. Shell jobs run independently of gateway health.

Operator commands

  • openclaw-scheduler jobs list -- running, scheduled, paused
  • openclaw-scheduler jobs runs -- full run history with stdout/stderr
  • openclaw-scheduler jobs approve / reject -- for approval steps
  • openclaw-scheduler jobs pause/unpause -- disable without deleting
  • openclaw-scheduler workflows list -- multi-step workflow status

Boundary

This tool replaces OpenClaw's built-in cron/heartbeat for hosts that need durability. It is not bundled with OpenClaw and not loaded as a plugin. The two can coexist (built-in cron handles agent heartbeats, openclaw-scheduler handles operator workflows), or operators can disable built-in cron and route everything through the scheduler.

Known gaps

  • macOS first-class; Linux works; Windows requires WSL2.
  • No native gateway-side UI yet; runs are read via the CLI.
  • See github.com/amittell/openclaw-scheduler/issues for open work.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-01 21:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,764
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,440
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,061 📥 799,140