MCP 服务器

Cron Translator

com.crontoenglish/cron-translator
开发者工具 公开且可连接 MCP 2025-11-25

此 MCP 可以做什么

Builds, explains, validates, and calculates upcoming execution times for standard cron expressions.

build_cron
Build a cron expression from English
Convert an English schedule description into a standard five-field cron expression, then explain and validate the result. Use this when a user describes a schedule in words and needs the expression. This is a RULE-BASED converter, not a language model: it handles a fixed grammar and returns an error listing the supported phrasings when a phrase falls outside it. That refusal is deliberate — a plausible-looking wrong schedule is worse than no answer. If a phrase is rejected, rephrase it into one of the supported shapes and call again. Returns the expression, which rule matched, any words the rules did not use (check these — leftover words may mean the phrase was misread), the English description of the result, warnings, and the next run times.
只读
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['phrase'], 'properties': {'phrase': {'type': 'string', 'description': 'An English schedule description, for example "every weekday at 9am" or "on the 1st of every month at midnight". Times accept 24-hour ("14:30"), 12-hour ("2:30pm"), "midnight", and "noon".'}, 'timezone': {'type': 'string', 'default': 'UTC', 'description': 'IANA timezone name, for example "UTC", "America/New_York", or "Europe/Berlin". Cron expressions carry no timezone of their own, so this decides when the schedule actually fires. Defaults to UTC.'}}}
explain_cron
Explain a cron expression
Translate a cron expression into plain English, list its upcoming run times in a specific timezone, and report the gotchas that make schedules misfire. Use this whenever a cron expression needs to be read, verified, or explained — and prefer it over reasoning about the expression directly. Cron has several counter-intuitive rules that are easy to get wrong: day-of-month and day-of-week are combined with OR (not AND) when both are set, steps like */7 do not divide their field evenly, dates like February 30 never fire at all, and daylight-saving transitions skip or repeat runs. This tool checks all of them. Returns the normalised expression, a one-sentence description, a per-field breakdown, a list of warnings with severity and a fix for each, the next run times as both UTC ISO 8601 instants and local wall-clock strings, and an approximate runs-per-day figure.
只读
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['expression'], 'properties': {'count': {'type': 'integer', 'default': 5, 'maximum': 25, 'minimum': 1, 'description': 'How many upcoming run times to return. 1-25, default 5.'}, 'timezone': {'type': 'string', 'default': 'UTC', 'description': 'IANA timezone name, for example "UTC", "America/New_York", or "Europe/Berlin". Cron expressions carry no timezone of their own, so this decides when the schedule actually fires. Defaults to UTC.'}, 'expression': {'type': 'string', 'description': 'A standard five-field cron expression: "minute hour day-of-month month day-of-week", for example "0 9 * * 1-5". Accepts *, numbers, ranges (9-17), lists (1,15), steps (*/5), three-letter month and day names (JAN, MON), and the @daily, @hourly, @weekly, @monthly, @yearly macros. A six-field expression is accepted and its leading seconds field is reported as non-standard.'}}}
next_cron_runs
Next cron run times
List the next run times for a cron expression in a specific timezone, with no prose. Use this when the only question is "when does this next fire" — for example to check whether a job will run before a deadline, or to show a user their upcoming schedule. Do not compute these dates yourself: weekday arithmetic, month lengths, and daylight-saving shifts make manual calculation unreliable. Returns each run as a UTC ISO 8601 instant plus a local wall-clock rendering in the requested timezone. Refuses Quartz-only syntax (L, W, #, ?) rather than guessing.
只读
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['expression'], 'properties': {'count': {'type': 'integer', 'default': 5, 'maximum': 25, 'minimum': 1, 'description': 'How many upcoming run times to return. 1-25, default 5.'}, 'timezone': {'type': 'string', 'default': 'UTC', 'description': 'IANA timezone name, for example "UTC", "America/New_York", or "Europe/Berlin". Cron expressions carry no timezone of their own, so this decides when the schedule actually fires. Defaults to UTC.'}, 'expression': {'type': 'string', 'description': 'A standard five-field cron expression: "minute hour day-of-month month day-of-week", for example "0 9 * * 1-5". Accepts *, numbers, ranges (9-17), lists (1,15), steps (*/5), three-letter month and day names (JAN, MON), and the @daily, @hourly, @weekly, @monthly, @yearly macros. A six-field expression is accepted and its leading seconds field is reported as non-standard.'}}}
已添加
build_cron
2026年9月17日 12:34
已添加
next_cron_runs
2026年9月17日 12:34
已添加
explain_cron
2026年9月17日 12:34