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