Cron Tools

io.github.basitalisandhuv0.1.1更新于 Oct 5, 2026

Parse, explain and validate 5-field cron expressions and list upcoming runs in a time zone.

已验证STDIO仅桌面Developer Tools

概览

AI 生成的概览

让助手解析、解释、校验 5 段式 cron 表达式,并按指定时区列出接下来的运行时间。

功能
提供四个面向 Vixie 风格 5 段式 cron 表达式的工具:parse_cron 拆分各字段取值并规范化表达式,explain_cron 返回一句英文说明,validate_cron 给出是否有效及警告,next_runs 列出带本地偏移和 UTC 的后续运行时间。支持列表、区间、步长、月份与星期名称、用 0 或 7 表示周日,以及 @hourly 到 @yearly 宏。时区计算仅使用 Intl。
适用场景
适合在编写或检查 crontab、GitHub Actions 计划任务或其他 cron 调度配置时,用来校验表达式或查看后续运行时间。也适合把不熟悉的表达式用通俗语言解释清楚。
运行要求
以本地 stdio 方式运行,可通过 npm 包(npx @basitalisandhu/mcp-cron-tools)或 Docker 镜像启动;npm 方式需要 Node.js。未声明账号、API 密钥、环境变量或请求头,服务器不进行网络访问。
安装前请注意
只读:它只解析和计算调度,不会创建、修改或删除 cron 任务。README 建议固定包版本,以免更新在你不注意时改变编辑器里运行的内容。不涉及凭据、文件或遥测。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cron Tools,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

cron-tools MCP server

Parses, explains, validates and schedules 5-field cron expressions in the Vixie cron dialect (Linux crontab, GitHub Actions, most schedulers), including lists, ranges, steps, month and weekday names, 0 or 7 for Sunday and the @hourly to @yearly macros. Time zone arithmetic uses Intl only; there are no dependencies beyond the MCP SDK and zod.

Part of dev-mcp-servers. Stdio transport only; the server never opens a port.

Tools

ToolInputWhat it returns
parse_cronexpressionPer field: raw text, wildcard flag and every accepted value; plus the normalised expression and macro expansion.
explain_cronexpressionOne English sentence, for example */15 9-17 * * 1-5 is "At every 15th minute past every hour from 9 through 17 on Monday through Friday."
validate_cronexpressionvalid, errors, and warnings: both day fields restricted (OR semantics), days that never occur in the chosen months, 7 for Sunday, ? spelling, macro expansion.
next_runsexpression, count? (1 to 100), timezone? (IANA), from? (ISO 8601)Upcoming run times in local time with offset and in UTC. Wall-clock times skipped by a forward DST transition are not run that day; a repeated hour runs twice. Stops after ten years.

Install

Claude Code:

bash
claude mcp add cron-tools -- npx -y @basitalisandhu/[email protected]

Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):

json
{  "mcpServers": {    "cron-tools": {      "command": "npx",      "args": ["-y", "@basitalisandhu/[email protected]"]    }  }}

Pin the version as shown so that an update to the package cannot change what runs in your editor without you noticing. From a checkout, use "command": "node", "args": ["<path>/packages/cron-tools/dist/index.js"] after npm install && npm run build at the repository root.

What it touches

  • Network: None.
  • Local files: None.
  • Telemetry: none.

Notes

  • Seconds fields (6-field Quartz) and L, W, # are rejected with an explanation.
  • When both day-of-month and day-of-week are restricted, a day matches if either does, as in Vixie cron.

Build and test

bash
npm install        # at the repository rootnpm run build -w @basitalisandhu/mcp-cron-toolsnpm test -w @basitalisandhu/mcp-cron-tools

Tests use node:test and the SDK's in-memory transport; they do not reach the network.

Licence

MIT. See LICENSE.

来源:packages/cron-tools/README.md,提交 58c8c95

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.1最新Oct 5, 2026