DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

XiaoWind /

XiaoWind/dsh-cron

已验证

DeepSeek Harness plugin: a /cron slash command for cron-scheduled recurring agent loops

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub
README来源: main@77cdeac0

dsh-cron

English | 中文

A DeepSeek Harness (DSH) plugin that adds a human-facing /cron slash command for cron-scheduled, recurring agent loops.

/cron "*/30 * * * *" posts a start notice, then fires one tick at every wall-clock minute matching the cron expression (for example :00 and :30), re-prompting the agent each time, until you stop it with /cron stop.

Install

# from GitHub (works immediately — no npm publish required)
dsh plugin --profile web add git+https://github.com/XiaoWind/dsh-cron.git

# or from npm, once published
dsh plugin --profile web add dsh-cron

The dsh plugin command forwards to pnpm inside the web profile directory, then reconciles the profile's dsh.profile.bundles layer list. Because this package declares dsh.bundle.patch, it joins the layer stack automatically. Restart the Web app after installing.

The plugin injects the commands service, so it activates only in profiles that compose a command adapter — the shipped web profile does.

Update

Pull the latest version of the plugin into an installed profile:

dsh plugin --profile web update dsh-cron

dsh plugin forwards to pnpm update dsh-cron inside the profile directory, which re-resolves the github:XiaoWind/dsh-cron dependency to the latest commit on the default branch. The lockfile pins a git dependency by commit hash, so a version bump is not required for the update to land. If pnpm has cached an old git resolution, re-pin it explicitly:

dsh plugin --profile web add github:XiaoWind/dsh-cron

Restart the Web app after updating — the bundle layer is composed at boot, so a running Web process does not hot-reload an installed plugin.

Usage

Command Result
/cron "*/30 * * * *" Fire at :00 and :30 every hour. Keeps any current objective.
/cron "0 9 * * 1-5" Fire weekdays at 09:00.
/cron "0 9 * * 1-5" fix the tests Weekdays at 09:00 toward an objective.
/cron fix the tests Fire toward an objective at the default schedule.
/cron resume Resume the schedule saved before a restart.
/cron or /cron status Show the running schedule.
/cron stop Stop the schedule.
/cron help Show help.

The schedule is standard 5-field cron (minute hour day-of-month month day-of-week), minute resolution, evaluated in local time. Supported per-field syntax: *, */n, n, a-b, a-b/n, a,b,c, and month/day names (JAN..DEC, SUN..SAT, case-insensitive). Seconds are not supported.

A leading 5-field cron expression is the schedule and the remainder is the objective; with no leading cron, the whole input is the objective and the default schedule applies.

Semantics

  • Wall-clock anchored. The objective's first tick fires at the next wall-clock minute matching the cron expression. Starting /cron posts a confirmation notice first, so a fresh session opens a turn and appears in the session list immediately.
  • Never interrupts a running turn. If a fire time arrives while the agent is busy, the tick waits for idle and then fires (it catches up the missed occurrence).
  • Saved across restarts. The schedule is persisted to $DSH_HOME/dsh-cron/<sessionId>.json. When you reopen the session after a restart, the plugin resumes the schedule automatically and tells you it is running; /cron resume restarts it manually when needed, and /cron stop discards the saved schedule.
  • Manual stop. The schedule runs until you run /cron stop, the agent is disposed, or the plugin is unloaded. There is no automatic completion detection.

Configuration

Set config.defaultCron (a 5-field cron string) to change the schedule used by a bare /cron <objective> with no leading cron expression. The default is */10 * * * * (every 10 minutes).

# your profile's cordis.patch.yml
- id: cron
  config:
    defaultCron: "0 * * * *"

Development

# syntax check
node --check lib/index.js
node --check lib/cron.js

# cron parser unit test
node test/cron.test.mjs

The plugin is a single-file ESM Cordis function plugin (lib/index.js) with no build step. It exports apply, inject, and name, and the bundle layer cordis.patch.yml inserts it into the profile composition.

License

MIT

—/ 5

暂无评分

已验证 DSH bundle

Commit 77cdeac0a6f4

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于