Skip to content

dsh-cron

Verified

@blanklog/dsh-cron Β· v0.1.0 Β· MIT

Global cron scheduling for DeepSeek Harness: durable tasks that deliver a message into their target session when due, waking a cold session when necessary

Install

dsh plugin add @blanklog/dsh-cron

Confirm the layer applied with dsh --profile default --dump-config β€” see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

@blanklog/dsh-cron

Global cron scheduling for DeepSeek Harness.

One process-level timer owns the whole task table and delivers each due task into its target session, waking a cold session when necessary. Tasks are durable: the rule is stored, never a precomputed instant, so a time-zone database update or a corrected system clock cannot invalidate a schedule.

Install

dsh plugin --profile web add @blanklog/dsh-cron

The package declares dsh.bundle.patch, so installing it also appends its name to the profile's dsh.profile.bundles. Restart dsh afterwards β€” the runtime resolution is computed once at startup.

To try it without touching a profile:

dsh web --patch ./cordis.patch.yml

Configuration

The row accepts these fields. Deployment-varying values are config, not constants:

Field Default Meaning
catchUp 'fire-once' What happens to an occurrence that is late but still inside catchUpWindowMs: fire it once, or skip it.
catchUpWindowMs 3600000 How long past its scheduled occurrence a task may still fire. A task older than this is abandoned and advanced to the present, because catching up a long outage would deliver stale reminders in a burst.
retryDelayMs 60000 Delay before a failed delivery is retried by the next drive.
maxResumedAgents 4 Maximum simultaneously live agents this plugin keeps after waking them.
fallbackCwd home directory Working directory for a session resumed without one of its own.

Override any of them from a profile's cordis.patch.yml or a --patch file:

- id: cron
  config:
    catchUp: skip
    maxResumedAgents: 8

Model tools

The plugin registers four tools, all scoped to the calling session:

Tool Effect
cron_create Schedule a five-field cron expression in an explicit IANA time zone.
cron_list List this session's tasks with their next occurrence.
cron_remove Delete one task by id.
cron_set_enabled Pause or resume one task.

Expressions are five-field only. Second- and year-bearing forms are rejected, because one session cannot absorb a per-second delivery and the minimum resolution is a protocol constraint rather than a deployment choice.

Runtime support

Peer Range
@deepseek-ai/dsh-* >=0.1.1-0 <0.2.0
@deepseek-ai/cordis, @deepseek-ai/schemastery any 4.x / 3.x supplied by the installation

The -0 prerelease floor matters: a plain ^0.1.1 range does not match 0.1.1-rc.2, because a prerelease sorts below its release, and Harness packages ship as prereleases during the developer preview.

Verified against dsh 0.1.1-rc.2 and 0.1.7-rc.1.

The brand helper is defined locally rather than imported from @deepseek-ai/dsh-brand: that package exported no runtime code at 0.1.1-rc.2, so importing brandString would make the module fail to link on that runtime. Branded still comes from the owning package.

Development

The sources live in the DeepSeek Harness checkout at packages/cron/cron, where they are type-checked against the workspace and covered by the repository test suite. This project owns only what differs for a published package: the manifest, the bundle patch, and the build.

node sync.mjs     # copy src/ from ../deepseek-harness/packages/cron/cron
npm run build     # tsc -b && tsdown
npm pack

cordis.patch.yml is not synced β€” the plugin row has to name this package rather than the in-repo name.

Known limitations

  • cron_list shows only the calling session's tasks. The task table is global, but a session must not see another session's reminders.
  • A task whose target session is archived is repointed at a fresh session rather than delivered into the archived one, because the archived-session gate blocks every model step it wakes.
  • The plugin is opt-in. Nothing schedules anything until a task is created through the tools.

License

MIT