DSH Plugins
返回列表
🧰

dsh-cron-parse

联网工具 更新于 2026.08.25

在终端中运行以下命令:

dsh plugin install ZhijiangTang/dsh-cron-parse

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在 DeepSeek Harness 终端中执行 dsh plugin install ZhijiangTang/dsh-cron-parse 即可安装该插件,源码仓库地址为 https://github.com/ZhijiangTang/dsh-cron-parse

插件介绍

Cron expressions are the lingua franca of scheduled jobs, yet a string of stars, slashes, and comma-separated lists can be hard to interpret at a glance. dsh-cron-parse turns that manual mental exercise into a single structured call: hand it an expression and get back a validation verdict, a human-readable Chinese description, the expanded value of each of the five fields, and up to ten concrete upcoming run timestamps — no more hunting through man pages or writing ad-hoc parsers.

Parsing follows classic Vixie semantics: when both dayOfMonth and dayOfWeek are constrained the match is an OR union; when only one is constrained it drives the schedule; when neither is constrained the job fires every day. Supported syntax includes wildcards, step ranges, closed intervals, multi-value lists, and case-insensitive month/day names. The engine also pre-checks unsatisfiable combinations such as 'February 30' and returns an early error instead of iterating pointlessly. All calculations advance in the requested IANA timezone and emit ISO 8601 timestamps with explicit offsets, so cross-timezone scheduling stops being a guess.

It is a good fit for product teams building job dashboards that need to tell end users exactly when a task will next run, and for ops or full-stack engineers who want to translate a raw cron string into plain language inside CI logs, alerting rules, or internal tooling. Zero dependencies, pure ESM, no build step — drop it in and call it.

使用场景

  • 在任务管理后台中向用户展示每条定时任务的下一次和后续运行时间
  • 接收用户输入的cron表达式时做即时校验并回显中文可读描述
  • 在CI日志或告警规则中把原始cron字符串翻译为人类可读的时间语义

适合人员

  • 构建调度功能的全栈或前端工程师
  • 需要在自动化流水线中解读cron语义的运维工程师
  • 在管理后台展示定时任务明细的产品团队