dsh-cron:为 DSH Automation 提供持久化 calendar 触发器

前言

在 DSH 插件生态里,定时触发通常需要把到点的计划事件转换成后续可执行的会话 Run。dsh-cron 面向这个问题:它为 DSH Automation 提供持久化 calendar 触发器,把一次性或重复计划转换为幂等的新会话 Runs,但自身不执行 Agent 回合。

这是什么

omdsh-dev/dsh-cron 是一个 MIT 许可证的 DSH 插件,定位为 DSH Automation 的持久化 calendar 触发器。

它处理计划解析、时区计算、持久化 occurrence 记录、幂等提交和任务中心 UI,并依赖 dsh-automation 的公共服务合同。

核心能力

下面介绍已核实的插件能力:

  • 支持五分钟字段 cron。
  • 支持一次性 RFC 3339 at 时间戳。
  • 支持 IANA 时区及 daylight-saving-aware occurrence calculation。
  • 为每次计划 occurrence 生成持久化记录与幂等提交。
  • 错过的重复任务采用 latest-only catch-up,不重放更早积压。
  • 通过 dsh.client manifest 提供浏览器任务中心。
  • 支持 headless profiles 的 tools、commands 和 RPC。
  • 提供模型工具 cron_addcron_updatecron_listcron_remove
  • 提供 /cron 命令,用于添加、一次性添加、暂停、恢复和删除任务。
  • 依赖 dsh-automation 的公共服务合同。

安装与启用

本插件要求 dsh-automation >=0.2.0-alpha.0 <0.3.0 服务合同。安装命令如下:

dsh plugin --profile web add github:omdsh-dev/dsh-cron

安装后,插件可通过 dsh.client manifest 提供浏览器任务中心,并可在 headless profiles 中通过 tools、commands 和 RPC 使用。

典型用法

模型工具

dsh-cron 提供以下模型工具:

  1. cron_add:创建重复或一次性任务。
  2. cron_update:暂停或恢复任务。
  3. cron_list:查看 schedules、occurrences、linked Runs 和 outcomes。
  4. cron_remove:删除任务。

/cron 命令

可以用 /cron 命令管理任务。示例如下:

/cron add 0 9 * * 1-5 Summarize the project status
/cron add tz=Asia/Shanghai 30 18 * * 5 Prepare the weekly report
/cron add-at 2026-09-01T09:00:00+08:00 Run the release checklist
/cron pause cron-1
/cron resume cron-1
/cron remove cron-1

这些命令分别用于添加重复任务、添加一次性任务、暂停任务、恢复任务和删除任务。

适用场景与注意

适合需要把日历计划转成 DSH Automation Runs 的 DSH 工作流,尤其是重复计划、一次性计划、跨时区计划和 headless 管理场景。

使用注意:

  • 插件以当前 dsh 进程权限运行,安装前应检查源码与许可证。
  • 本插件要求 dsh-automation >=0.2.0-alpha.0 <0.3.0 服务合同。
  • 插件自身不执行 Agent turn。
  • 错过的重复任务只补跑最新一次,旧积压不重放。
  • 暂停会保留计划;恢复会让重复计划跳过当前时间之前的 occurrence。
  • 浏览器/API 任务必须发送 cwd 或继承 defaultCwd
  • cwddefaultCwd 的 legacy 任务会被安全暂停并标记 migrationIssue
  • 不导入私有 dsh-automation 源码,也不需要修改 deepseek-harness。

链接

  • 目录页:https://www.skillhub.cn/plugins/omdsh-dev/dsh-cron
  • GitHub:https://github.com/omdsh-dev/dsh-cron
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜