cofy-x/dsh-cron4

@cofy-x/dsh-cron

Durable cron Trigger adapter for DSH Automation: calendar occurrences become idempotent fresh-Session Runs

包名
@cofy-x/dsh-cron
版本
0.8.0-alpha.3
许可证
MIT
最近更新
2026年9月11日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:cofy-x/dsh-cron

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

KeyDefaultMeaning
dataDir$DSH_HOME/crondurable job store and scheduler lock directory
defaultTimeZonehost zonezone used when a cron expression omits one
maxJobs64maximum active jobs
minIntervalMinutes1minimum recurring interval
defaultCwdnoneabsolute fallback workspace for browser/API jobs
reconcilePollMs1000Automation event-feed poll interval
maxRunHistory100retained 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.