← 返回 Skills 市场
amittell

Durable Scheduler

作者 amittell · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
50
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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 \x3Cid> -- full run history with stdout/stderr
  • openclaw-scheduler jobs approve \x3Cid> / reject \x3Cid> -- for approval steps
  • openclaw-scheduler jobs pause/unpause \x3Cid> -- 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.
安全使用建议
Install only if you intentionally want a persistent host-side scheduler. Before using shell workflows, especially sudo commands, inspect the npm package/source, pin a trusted version, run jobs with the least privilege possible, test non-destructively, and keep cleanup/remediation scripts narrowly scoped and reversible.
能力评估
Purpose & Capability
The skill clearly describes a durable OpenClaw scheduler that runs shell and agent workflows, persists run history in SQLite, and can survive gateway restarts; those capabilities fit the stated purpose but are inherently high-impact.
Instruction Scope
The instructions are scoped to durable scheduling and include a boundary saying not to use it for simple cron needs, but the workflow example includes a sudo cleanup command without much safety guidance.
Install Mechanism
Installation uses a global npm package and launchd bootstrap, then creates a local scheduler database and plist; this is coherent for a scheduler but should be reviewed because it installs an external persistent service.
Credentials
Gateway HTTP access and shell execution are proportionate for the advertised orchestration role, and the artifact does not request unrelated credentials or broad data ingestion.
Persistence & Privilege
The scheduler is explicitly persistent and can run shell workflows, including privileged commands if the operator configures them; this is disclosed and approval-oriented, but users should constrain commands carefully.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install durable-scheduler
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /durable-scheduler 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of openclaw-scheduler: a durable, SQLite-backed job and workflow scheduler for OpenClaw environments. - Supports shell and agent job scheduling with full audit trail, retries, approvals, and run history. - Runs as a standalone Node.js 22+ launchd service, independent of the OpenClaw gateway; jobs persist through gateway restarts. - Adds CLI tools for job and workflow management, run logs, approvals, and job state. - Multi-step workflow support for chaining shell, agent, and approval steps with persistent state and failure handling.
元数据
Slug durable-scheduler
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 50 次。

如何安装 Durable Scheduler?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install durable-scheduler」即可一键安装,无需额外配置。

Durable Scheduler 是免费的吗?

是的,Durable Scheduler 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Durable Scheduler 支持哪些平台?

Durable Scheduler 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Durable Scheduler?

由 amittell(@amittell)开发并维护,当前版本 v1.0.0。

💬 留言讨论