@cofy-x/dsh-cron
Durable cron Trigger adapter for DSH Automation: calendar occurrences become idempotent fresh-Session Runs
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:cofy-x/dsh-cron说明文档
阅读完整 README ↗Usage
Model tools:
cron_add— create a recurring or one-shot job;cron_update— pause or resume;cron_list— inspect schedules, occurrences, linked Runs, and outcomes;cron_remove— delete a job.
Commands:
/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
Jobs created by a command or model tool capture the creating Session's absolute workspace as a fresh Automation target. Browser/API jobs must send cwd or inherit defaultCwd. Migrated legacy jobs without either are safely paused with a migrationIssue until retargeted.
Configuration
| Key | Default | Meaning |
|---|---|---|
dataDir | $DSH_HOME/cron | durable job store and scheduler lock directory |
defaultTimeZone | host zone | zone used when a cron expression omits one |
maxJobs | 64 | maximum active jobs |
minIntervalMinutes | 1 | minimum recurring interval |
defaultCwd | none | absolute fallback workspace for browser/API jobs |
reconcilePollMs | 1000 | Automation event-feed poll interval |
maxRunHistory | 100 | retained terminal occurrences per job |
Only the scheduler-lock holder arms timers, submits pending occurrences, and reconciles the feed. Other processes sharing the same Harness home expose management services and can take over after the holder exits.
Management writes use a separate short-lived cross-process lock, collision-free sequence sidecar, and record-level three-way merge. A process adopts peer additions and untouched edits without resurrecting deletions; prolonged lock contention fails closed instead of overwriting peer state.
The adapter requires the public dsh-automation >=0.2.0-alpha.0 <0.3.0 service contract. It does not import private dsh-automation source and requires no deepseek-harness modification.