Skip to main content

Documentation Index

Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt

Use this file to discover all available pages before exploring further.

检查持久化的后台任务和 Task Flow 状态。若不指定子命令, openclaw tasks 等同于 openclaw tasks list 有关生命周期和交付模型,请参见 后台任务

用法

openclaw tasks
openclaw tasks list
openclaw tasks list --runtime acp
openclaw tasks list --status running
openclaw tasks show <lookup>
openclaw tasks notify <lookup> state_changes
openclaw tasks cancel <lookup>
openclaw tasks audit
openclaw tasks maintenance
openclaw tasks maintenance --apply
openclaw tasks flow list
openclaw tasks flow show <lookup>
openclaw tasks flow cancel <lookup>

根选项

  • --json:输出 JSON。
  • --runtime <name>:按类型筛选:subagentacpcroncli
  • --status <name>:按状态筛选:queuedrunningsucceededfailedtimed_outcancelledlost

子命令

list

openclaw tasks list [--runtime <name>] [--status <name>] [--json]
按最新优先列出已跟踪的后台任务。

show

openclaw tasks show <lookup> [--json]
通过任务 ID、运行 ID 或会话键显示一个任务。

notify

openclaw tasks notify <lookup> <done_only|state_changes|silent>
更改正在运行任务的通知策略。

cancel

openclaw tasks cancel <lookup>
取消正在运行的后台任务。

audit

openclaw tasks audit [--severity <warn|error>] [--code <name>] [--limit <n>] [--json]
显示过期、丢失、传递失败或其他不一致的任务和 Task Flow 记录。保留到 cleanupAfter 的丢失任务会作为警告;已过期或未加时间戳的丢失任务会作为错误。

maintenance

openclaw tasks maintenance [--apply] [--json]
预览或应用任务与 Task Flow 的协调、清理加盖时间戳以及修剪。 对于 cron 任务,在将旧的活动任务标记为 lost 之前,协调会使用持久化的运行日志/作业状态,因此已完成的 cron 运行不会仅仅因为内存中的 Gateway 运行时状态消失而变成错误的审计问题。离线 CLI 审计并不是 Gateway 进程本地 cron 活动作业集合的权威来源。

flow

openclaw tasks flow list [--status <name>] [--json]
openclaw tasks flow show <lookup> [--json]
openclaw tasks flow cancel <lookup>
检查或取消任务账本下持久化的 Task Flow 状态。

相关内容