Cron 解析器

粘贴一个 cron 表达式,即可看到它的含义和下一次运行时间。支持标准五字段语法以及 @hourly / @daily / @weekly / @monthly / @yearly 别名。

下次运行时间按你浏览器的本地时区计算。

自然语言

Plain-English explanation will appear here.

下 5 次运行 (本地时间)

Next scheduled run times will appear here.
Type a cron expression — fields are minute hour day-of-month month day-of-week.

字段参考

FieldRangeSpecial
Minute0–59* , - */N
Hour0–23* , - */N
Day of month1–31* , - */N
Month1–12 or JANDEC* , - */N
Day of week0–6 (Sun=0) or SUNSAT* , - */N

Aliases: @yearly = 0 0 1 1 *, @monthly = 0 0 1 * *, @weekly = 0 0 * * 0, @daily = 0 0 * * *, @hourly = 0 * * * *.

day-of-month 与 day-of-week 的相互作用

POSIX-style cron evaluates day-of-month and day-of-week with an OR rule when both are restricted. For example 0 12 1 * 1 fires at noon on the 1st of every month and every Monday — not only Mondays that fall on the 1st. If you want “only Mondays that are the 1st”, you have to filter inside the job.

常见问题

0 12 1 * 1 是什么意思?

每月 1 日中午每个周一中午。标准 cron 在 day-of-month 与 day-of-week 都受限时按 OR 处理。

为什么 */5 * * * * 不是严格的每 5 分钟一次?

它就是 — 但总是落在 5 的倍数分钟 (0、5、10、…) 上,而不是从你启动任务的时刻起算。*/5 意味着「字段范围内能被 5 整除的值」。

支持秒吗?

本解析器不支持。标准 Unix cron 有五个字段,且不含秒。一些调度器 (Quartz、Spring) 增加了第六个秒字段 — 请将这类表达式粘贴到支持六字段格式的解析器中。

下次运行使用的是哪个时区?

你浏览器的本地时区。列表上方的标签会显示时区偏移以便对照。

相关工具