OpenClaw Cron Guardrails
Use this skill when the user wants a scheduled or repeated action, even if they never say cron.
What this skill is for
This skill is a guardrails layer for scheduled agent actions.
Treat OpenClaw cron as:
- - scheduler
- agent runtime
- delivery router
The timer is usually not the hard part. The hard part is choosing the right task type, session target, and delivery target.
Use this workflow
- 1. Classify the request.
- Choose the safest job pattern.
- Explain what will happen.
- Create, inspect, or modify the job.
- Verify after creation/edit.
First classify the request
Choose one bucket first:
- 1. Plain reminder
- - Example: INLINECODE1
- Default: INLINECODE2
- Use for lightweight reminders and nudges.
- 2. Recurring reminder
- - Example: INLINECODE3
- Usually still INLINECODE4
- Set timezone explicitly if wall-clock time matters.
- 3. Internal worker
- - Example: INLINECODE5
- Default: INLINECODE6
- Use for background chores, scans, maintenance, and noisy internal jobs.
- 4. Scheduled visible delivery
- - Example: INLINECODE7
- Default: INLINECODE8
- Do not rely on implicit
last in multi-channel setups.
- 5. Session/thread push or prompt injection
- - Example: INLINECODE10
- Preserve current-session / current-thread intent explicitly.
- Do not silently convert this into generic visible delivery.
- 6. Diagnose / repair existing cron
- - Example:
Why did this job not deliver? / INLINECODE12 - Inspect first. Do not recreate blindly.
Safe defaults
Use these defaults unless the user clearly wants something else:
- - reminder → INLINECODE13
- background worker → INLINECODE14
- visible scheduled post → INLINECODE15
- recurring job → explicit INLINECODE16
- non-trivial task → INLINECODE17
When to ask instead of guessing
Ask a focused clarification if any of these are unclear:
- - reminder vs worker vs visible scheduled post
- current thread/current session vs explicit external target
- concrete
channel given but to missing - research-task semantics are mixed into an otherwise normal reminder request
- wall-clock schedule matters but timezone is not clear
Do not hide ambiguity with clever defaults when the job could post to the wrong place.
Output contract
When helping with a cron request, prefer this response order:
- 1. detected task type
- chosen safe pattern
- exact command or exact JSON/tool payload
- why this pattern is safe
- verification step
Keep the top-level explanation short and predictable.
Verification after create/edit
Always verify after creating or editing a job:
- 1. INLINECODE20
- INLINECODE21
- if safe, INLINECODE22
- confirm:
- - correct INLINECODE23
- correct payload kind
- correct timezone
- explicit delivery target, or explicit INLINECODE24
- plausible timeout
Repair workflow
When repairing an existing job:
- 1. read the existing job
- inspect recent runs
- classify the failure
- fix the root cause, not just the symptom
Common failure buckets:
- - delivery-target ambiguity
- auth/permission/channel issue
- timeout too short
- schedule/timezone issue
- prompt/content issue
For a fuller triage flow, read references/diagnostics.md.
What to read
Read only what you need.
Beta-essential references
- -
references/intent-routing.md — intent buckets and normalization schema - INLINECODE27 — safe default patterns
- INLINECODE28 — common failure modes and anti-patterns
- INLINECODE29 — prompt-first examples for real user requests
Deeper references
- -
references/integration-modes.md — natural-language vs normalized-intent vs spec-first integration paths - INLINECODE31 — structured triage and repair flow
- INLINECODE32 — natural-language parser examples
- INLINECODE33 — normalized intent → cron spec examples
- INLINECODE34 — cron spec JSON examples
- INLINECODE35 — explicit target string guidance
Scope boundary
Do not turn this skill into a universal prompt-understanding layer.
Its job is to:
- - provide easy-start patterns
- enforce safe routing/session/delivery defaults
- support deterministic validate/render/create flows
Upstream products or base models may do richer prompt understanding than this skill does. That is fine.
Prefer stable interfaces over trying to cover every possible natural-language corner case here.
Scripts
Use scripts when the user wants a deterministic, reusable cron definition instead of ad-hoc flag assembly.
Parse / normalize
- - INLINECODE36
- INLINECODE37
Validate / render / create
- - INLINECODE38
- INLINECODE39
- INLINECODE40
Inspect / doctor / repair
- - INLINECODE41
- INLINECODE42
- INLINECODE43
Non-goals
This skill is not:
- - a full replacement for OpenClaw cron docs
- a guarantee against every runtime/provider failure
- a license to guess external delivery targets when intent is ambiguous
Prefer explicit, boring, reproducible cron definitions over clever shorthand.
OpenClaw Cron 防护栏
当用户需要定时或重复操作时使用此技能,即使他们从未提及cron。
此技能的用途
此技能是定时智能体操作的防护栏层。
将OpenClaw cron视为:
计时通常不是难点。难点在于选择正确的任务类型、会话目标和投递目标。
使用此工作流程
- 1. 对请求进行分类。
- 选择最安全的作业模式。
- 说明将要执行的操作。
- 创建、检查或修改作业。
- 创建/编辑后进行验证。
首先对请求进行分类
先选择一个类别:
- 1. 简单提醒
- - 示例:20分钟后提醒我回复
- 默认值:main + systemEvent
- 用于轻量级提醒和提示。
- 2. 重复提醒
- - 示例:每天早上提醒我查看日历
- 通常仍为main + systemEvent
- 如果墙钟时间重要,需明确设置时区。
- 3. 内部工作器
- - 示例:运行夜间扫描并将结果保存在本地
- 默认值:isolated + delivery.mode:none
- 用于后台任务、扫描、维护和嘈杂的内部作业。
- 4. 定时可见投递
- - 示例:每天早上9点将每日摘要发布到Discord
- 默认值:isolated + 明确 delivery.channel + 明确 delivery.to
- 在多通道设置中不要依赖隐式的last。
- 5. 会话/线程推送或提示注入
- - 示例:每10分钟推送当前线程
- 明确保留当前会话/当前线程的意图。
- 不要静默地将其转换为通用的可见投递。
- 6. 诊断/修复现有cron
- - 示例:为什么这个作业没有投递? / 修复这个cron
- 先检查。不要盲目重建。
安全默认值
除非用户明确要求其他设置,否则使用以下默认值:
- - 提醒 → main + systemEvent
- 后台工作器 → isolated + no-deliver
- 可见定时发布 → isolated + 明确 channel + 明确 to
- 重复作业 → 明确 tz
- 非简单任务 → timeoutSeconds >= 180
何时询问而非猜测
如果以下任何情况不明确,请进行有针对性的澄清:
- - 提醒 vs 工作器 vs 可见定时发布
- 当前线程/当前会话 vs 明确的外部目标
- 给出了具体的channel但缺少to
- 研究任务语义混入了一个原本普通的提醒请求
- 墙钟时间重要但时区不明确
当作业可能投递到错误位置时,不要用巧妙的默认值来掩盖歧义。
输出约定
在处理cron请求时,优先采用以下响应顺序:
- 1. 检测到的任务类型
- 选择的安全模式
- 确切的命令或确切的JSON/工具负载
- 为什么此模式是安全的
- 验证步骤
保持顶层解释简短且可预测。
创建/编辑后的验证
创建或编辑作业后务必进行验证:
- 1. openclaw cron list
- openclaw cron runs --id --limit 5
- 如果安全,openclaw cron run
- 确认:
- - 正确的sessionTarget
- 正确的负载类型
- 正确的时区
- 明确的投递目标,或明确的none
- 合理的超时时间
修复工作流程
修复现有作业时:
- 1. 读取现有作业
- 检查最近的运行记录
- 对故障进行分类
- 修复根本原因,而不仅仅是症状
常见故障类别:
- - 投递目标歧义
- 认证/权限/通道问题
- 超时时间过短
- 调度/时区问题
- 提示/内容问题
如需更完整的分诊流程,请阅读references/diagnostics.md。
需要阅读的内容
只阅读你需要的内容。
Beta必备参考
- - references/intent-routing.md — 意图类别和规范化模式
- references/patterns.md — 安全默认模式
- references/pitfalls.md — 常见故障模式和反模式
- references/public-examples.md — 真实用户请求的提示优先示例
深度参考
- - references/integration-modes.md — 自然语言 vs 规范化意图 vs 规范优先集成路径
- references/diagnostics.md — 结构化分诊和修复流程
- references/nl-parser-examples.md — 自然语言解析器示例
- references/intent-to-spec-examples.md — 规范化意图 → cron规范示例
- references/spec-examples.md — cron规范JSON示例
- references/target-helpers.md — 明确目标字符串指南
范围边界
不要将此技能转变为通用的提示理解层。
它的职责是:
- - 提供易于上手的模式
- 强制执行安全的路由/会话/投递默认值
- 支持确定性的验证/渲染/创建流程
上游产品或基础模型可能比此技能进行更丰富的提示理解。这没问题。
优先选择稳定的接口,而不是试图覆盖每一个可能的自然语言边缘情况。
脚本
当用户想要确定性的、可重用的cron定义而不是临时标志组合时,使用脚本。
解析/规范化
- - scripts/parsenlintent.py
- scripts/intenttocron_spec.py
验证/渲染/创建
- - scripts/validatecronspec.py
- scripts/rendercroncommand.py
- scripts/create_cron.py
检查/诊断/修复
- - scripts/lintexistingcrons.py
- scripts/cronfix.py
- scripts/crondoctor.py
非目标
此技能不是:
- - OpenClaw cron文档的完整替代品
- 对每个运行时/提供者故障的保证
- 在意图不明确时猜测外部投递目标的许可
优先选择明确、规范、可复现的cron定义,而不是巧妙的简写方式。