dsh-scheduler
Manifest validCron/one-shot scheduled tasks: run shell commands or fire webhooks on a schedule, with optional ServerChan/DingTalk/Feishu/webhook delivery of results.
dsh-scheduler
DeepSeek Harness 定时任务插件:cron 表达式 / 一次性时间点触发,执行 shell 命令或投递 webhook,命令结果可选推送到 ServerChan / 钉钉 / 飞书 / 通用 Webhook。
安装
dsh plugin --profile <name> add dsh-scheduler
# 或从本地 checkout 安装
cd ~/dsh-scheduler && dsh plugin --profile <name> add .
配置
在 profile 的 cordis.patch.yml(或 --patch overlay)中:
- id: scheduler
config:
enabled: true
jobs:
- id: daily-report # 每天 09:00 跑一次脚本,结果发 ServerChan
cron: '0 9 * * *'
timezone: 'Asia/Shanghai'
task:
type: command
command: 'bash report.sh'
channel:
type: serverchan
url: 'https://sctapi.ftqq.com/<SENDKEY>.send'
- id: heartbeat # 每 5 分钟 POST 一次心跳
cron: '*/5 * * * *'
task:
type: webhook
url: 'https://example.com/hook'
payload: { text: 'dsh alive' }
- id: deploy-window # 一次性任务:到点执行
at: '2026-08-16T09:00:00+08:00'
task:
type: webhook
url: 'https://example.com/hook'
字段说明
| 字段 | 说明 |
|---|---|
jobs[].cron | 5/6 位 cron 表达式(可含秒字段);与 at 二选一 |
jobs[].at | ISO 8601 时间戳,一次性任务;与 cron 二选一 |
jobs[].timezone | 可选,IANA 时区名(如 Asia/Shanghai),仅 cron 生效 |
jobs[].task.type | command(执行 shell 命令)或 webhook(POST JSON) |
jobs[].task.command | 要执行的命令;cwd 可选工作目录 |
jobs[].task.channel | 可选,命令结果投递通道:serverchan / dingtalk / feishu / generic |
jobs[].task.url / payload | webhook 端点与 JSON 载荷(自动附加 job 与 at 字段) |
使用
插件提供模型可见工具 scheduler_status:列出所有已配置任务、下一次执行时间、上次执行状态与结果。Agent 在对话中询问「有什么定时任务」即可自动调用;任务本身按调度自动触发,无需人工干预。
- cron 任务错过执行窗口(如系统休眠)不会回补刷屏:触发后直接推进到下一次未来时刻。
- 命令执行有 120s 超时与 1 MiB 输出上限;投递失败只记录状态,不影响插件运行。
- 单次执行有重入保护,超长命令不会造成同任务并发。
开发
pnpm install && pnpm build
node --import tsx test/scheduler.test.mjs # 引擎单测(假时钟 + 本地 webhook sink)
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.7 | — | — |
| 0.1.18 | — | — |
| 2026.8.24 | — | — |
| 2026.8.25 | — | — |
| 2026.8.251 | — | — |
| 2026.8.252 | — | — |
| 2026.8.310 | — | — |
| 2026.9.10 | — | — |
| 2026.9.11 | — | — |
| 2026.9.70 | — | — |
| 2026.9.72 | — | — |
Comments
Loading…
Similar plugins
by Jesse-njx
Scheduled agents on a cron: run a prompt on a schedule and get the digest where you already are, with overlap/missed-run/timeout safety defaults.
★ 0
MIT
TypeScript
Aug 28, 2026
dsh plugin --profile web add @dsh-routines/bundleby squirrel20
Unattended scheduled jobs for the DeepSeek Harness (dsh): agent/command tasks on cron schedules
★ 7
↓ 109/wk
MIT
JavaScript
Oct 10, 2026
dsh plugin --profile web add dsh-cronby Mappedinfo
DSH 系统级 cron 定时任务插件:规则存为 Cron 表达式,由用户 crontab 在进程外执行 headless 任务,Web 端管理规则与运行结果
★ 0
MIT
TypeScript
Sep 14, 2026
dsh plugin --profile web add @mappedinfo/dsh-cron-schedulerby a792883583
Scheduled tasks panel for managing DSH agent and system crontabs with natural language input and execution logs.
★ 2
↓ 211/wk
MIT
TypeScript
Sep 17, 2026
dsh plugin --profile web add dsh-cron-panelby cofy-x
Scheduled tasks (cron) for DeepSeek Harness: model- and human-callable scheduling that fires followup/inject into agent sessions
★ 6
↓ 58/wk
MIT
TypeScript
Sep 11, 2026
dsh plugin --profile web add @cofy-x/dsh-cronby yangdongzhen590
Cron task scheduler for DeepSeek Harness: scheduled sessions with your prompt, workspace-aware placement, paginated execution history, open-session from the panel.
★ 3
↓ 196/wk
MIT
TypeScript
Sep 9, 2026
dsh plugin --profile web add dsh-scheduler