fan56/dsh-cron0

@aiwayds/dsh-cron

dsh plugin: cron scheduling — bounded tasks with calendar & interval rules, delivered to live agents

包名
@aiwayds/dsh-cron
版本
0.1.0
许可证
MIT
最近更新
2026年9月2日

安装

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

Agent usage (primary)

The LLM calls the tools directly. Humans just talk:

  • "每 10 分钟检查一次 CI run 1234,最多查两小时,成功或失败就停" → cron_create({ every_seconds: 600, prompt: "检查 CI run 1234,终态则 cron_delete 本任务并汇报", max_duration_seconds: 7200 })
  • "工作日每天早上 9 点生成周报,到年底为止" → cron_create({ cron: "0 9 * * 1-5", prompt: "生成本周周报", end_at: "2026-12-31T23:59:59+08:00" })
  • "每小时看一眼磁盘,如果超过 90% 立刻插进来提醒我" → cron_create({ cron: "0 * * * *", prompt: "检查磁盘使用率", delivery_policy: "steer", execution_mode: "self", max_duration_seconds: 86400 })

Tool reference

ToolPurpose
cron_createCreate a task. Exactly one rule (cron | every_seconds); recurring tasks require exactly one window bound (max_duration_seconds | end_at).
cron_listActive tasks with next-fire times and retained fire records.
cron_deleteDelete and archive (status cancelled).
cron_reportBackfill a fire's outcome (completed/failed + summary); one-shots archive on report.

Cron syntax

Standard 5 fields: minute hour day-of-month month day-of-week, with lists (1,3,5), ranges (1-5), steps (*/2), and month/day names (jan, mon). Evaluated in the host's local time zone (a per-task IANA time_zone is a planned fast-follow — see ADR 0009).

Human usage

/cron list
/cron create "*/10 * * * *" "检查 CI run 1234,终态则删除本任务" --for=7200
/cron create "0 9 * * 1-5" "生成周报" --until=2026-12-31T23:59:59+08:00
/cron delete a1b2c3d4
/cron fires a1b2c3d4
/cron history 20