鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-plugins#dsh-plugin-scheduled-tasks

按项目调度提示词,在全新的无头 Agent 会话中执行,支持单次、固定间隔和 cron 计划,并持久化运行历史。

工作流
访问 GitHub
文档README

@opendsh/dsh-plugin-scheduled-tasks

DSH web plugin: per-project scheduled tasks with prompts. Create a task in the sidebar (⏰ 定时任务), give it a prompt, and the plugin runs that prompt on schedule — as a fresh headless agent session in the project directory — then records the outcome as durable run history.

What it does

  • Project-scoped tasks — each task belongs to a project directory (a DSH workspace). The panel lists tasks for the selected workspace.
  • Three schedule kinds
    • at — run once at an absolute time (strict RFC 3339 instant, or a local date/time with an explicit IANA time zone; DST gaps are rejected, overlaps pick the earlier instant).
    • every — run on a fixed creation-anchored interval (≥ 5 minutes); missed intervals are never replayed, only the latest due occurrence runs.
    • cron — run on a cron calendar rule (five/six/seven-field expression, e.g. 0 9 * * 1-5, evaluated in an explicit IANA time zone, DST-aware).
  • Prompt execution — on schedule, a brand-new agent session is created in the project directory with the task's prompt and driven to quiescence (the same drive pattern as dsh --profile headless). The run session appears in the project's conversation list with a pinned title (⏰ <task name>) and stays resumable; the final assistant text is also captured into the run record.
  • Per-task model override — each task may pin an explicit provider/model selection, picked from the grouped provider catalog in the panel (the same groups the DSH model selector renders, with the current default selection shown as the first option). Runs then use that model instead of the deployment default; the effective model of every run is recorded in its history. Leaving the picker empty follows the default selection.
  • Run history — status (running / completed / failed), start/finish times, output (truncated at 20 KB), error messages; newest first, capped at 20 records per task (configurable).
  • Manual run-now — runs a task immediately without touching its schedule.
  • Lifecycle semantics
    • Runs only while the DSH web process is alive. After a restart, overdue one-shots run once and are marked overdue; overdue every tasks run only their latest due occurrence.
    • One-shot at tasks finish after their single run; every tasks stay active and advance to the next anchor-aligned target.

Architecture

A dual-face npm package installed into the web profile:

HalfEntryRole
Serverlib/index.jsCordis plugin: opens the scheduled_tasks storage domain (ctx.storageDomain), mounts the task store, the scheduler (bounded timers, clock-rollback-safe wakes), the headless executor, and the ctx.tasks typert service.
Protocollib/typert.jsHost TYPERT face (tasks/* endpoints), auto-registered by dsh-typert-loader.
Browserlib/client.jsReact panel mounted into the sidebar.footer.action slot; calls the host through the installed remote.tasks namespace.

The client↔server channel is the DSH typert protocol (the same mechanism dsh-commands uses): strict zod codecs validate every argument and result on both sides, and no session needs to exist for the panel to work.

Install

▼
sh
复制代码
dsh plugin --profile web add @opendsh/dsh-plugin-scheduled-tasks

Development

▼
sh
复制代码
pnpm --dir src/plugins/dsh-plugin-scheduled-tasks typecheck # tsc (TypeScript 7) pnpm --dir src/plugins/dsh-plugin-scheduled-tasks test # vitest pnpm --dir src/plugins/dsh-plugin-scheduled-tasks build # tsc emit + tsdown client bundle + loader wrapper

After changing sources, rebuild and re-sync the profile copy (pnpm install inside the profile re-copies file: dependencies), then restart dsh web — the plugin has no HMR channel.

Configuration

KeyDefaultMeaning
maxConcurrentRuns2Maximum concurrently running agent sessions across all tasks.
keepRunsPerTask20Run-history records retained per task (oldest pruned beyond the cap).

Troubleshooting

Tool calls that fail with “Interrupted: interrupted” (underlying error Cannot read properties of undefined (reading 'prepare')) are almost always a duplicate @deepseek-ai/dsh-tools copy caused by declaring DSH packages in dependencies instead of peerDependencies. See docs/troubleshooting.md for the full write-up.

Limitations

  • Schedules fire only while the web process is running (same posture as dsh-schedule); there is no external wake-up when the process is down.
  • Each run consumes model tokens with the task's pinned model, or the current default model when the task pins none — the panel says so explicitly.
  • Run history is refreshed by polling while the panel is open (10 s interval); push updates are deferred work.
工作流

快捷安装

复制到终端去安装插件

dshplugin--profilewebadd@opendsh/dsh-plugin-scheduled-tasks

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
DSH-Feedback-Bridge
将 DSH 对话整理为可审阅的社区反馈,并在确认后提交到 DeepSeek Harness 官方 Discussions。
dsh-itranslation#bundle
DeepSeek Harness 整本书翻译生产线:确定性章节识别与分段、子代理逐章翻译、术语表控制、全书审查、定向修订,以及可审计的 meta.json 证据链。
dsh-md-convert
将 Office 文档与 PDF(含扫描件)转换为保留结构的 Markdown,采用 CPU 优先的路由 OCR 流水线(RapidOCR/SLANet/FormulaNet)。
dsh-subagent-pool
为 DeepSeek Harness 维护可复用的命名子代理配置,并按配置的模型、推理强度和 Agent 预设运行子代理。
dsh-plugins#dsh-wx-push
DSH 会话任务结束后自动把结果原文推送到微信(iLink 直发,真实校验送达,失败如实报错)。需配置 wechat-acp 守护进程——一个需要另外安装并扫码登录微信的独立进程。