全球免费使用

Cron 表达式解释器与下次运行时间

粘贴 */15 9-17 * * 1-5 或 @daily 这样的五字段 cron 表达式,即可查看每个字段的含义,以及从你选定日期起、以 UTC 表示的下次运行时间。支持列表、范围、步长以及月份和星期名称。

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

输入

提示:按 Ctrl + Enter 运行

你的结果

结果将显示在这里。

下方的详细帮助目前仅提供英文版。

关于此工具

Cron schedules power backups, reports, cleanup jobs and reminders on servers everywhere, but five cryptic fields like */15 9-17 * * 1-5 are easy to misread. A single wrong field can mean a job runs every minute instead of every hour, or never at all. This explainer breaks the expression into its fields (minute, hour, day of the month, month and day of the week), describes each one in words and lists the next times the job will run.

It understands the standard crontab features: lists (1,15), ranges (9-17), steps (*/15 or 0-30/10), month and weekday names (JAN, MON) and the @daily, @weekly, @monthly, @yearly and @hourly shortcuts. Run times are given in UTC from a start date and time you choose, which is how most servers run cron.

使用方法

  1. Paste the cron expression, for example 0 2 * * 0 or @daily.
  2. Set the date and time (UTC) to count from, such as the next deployment.
  3. Choose how many upcoming runs to list, up to 20.
  4. Run it and read the field-by-field description and the list of next run times.

计算原理

Each field is expanded into the set of values it allows: * means every value, a-b a range, x/n every n-th value, and commas join parts. Day-of-week 0 and 7 both mean Sunday. A minute matches when its month, hour and minute are in their sets and the day matches: if both day fields are restricted, classic (Vixie) cron accepts either one; otherwise both must match. The explainer steps forward day by day and lists the matching minutes after the start time.

a run happens at every minute that matches all five fields; when both day fields are restricted, either may match

计算示例

A team schedules a health check with */15 9-17 * * 1-5 and wants to know when it first runs after 08:00 UTC on Monday, November 2, 2026. The explainer reads it as every 15 minutes, hours 09:00 to 17:00, Monday to Friday, and lists 09:00, 09:15, 09:30, 09:45 and 10:00 UTC that morning. The last run each day is at 17:45, not 17:00, a detail that often surprises people.

示例输入和结果

*/15 9-17 * * 1-5:周一至周五,从 09:00 到 17:45 每 15 分钟一次(UTC)

局限性

  • Five-field crontab syntax only; no seconds, years or Quartz symbols (?, L, W, #).
  • Run times are calculated in UTC and ignore daylight-saving changes in local server time.
  • Searches up to about eight years ahead; schedules such as 0 0 30 2 * that never occur are reported.

最后更新:

常见问题

cron 中的 */15 是什么意思?

从该字段的最小值开始,每隔 15 个单位:在分钟字段中表示第 0、15、30 和 45 分钟。

为什么我的任务运行的天数比预期的多?

当“日”和“星期”两个字段都有限制时,经典 cron 只要其中一个匹配就会运行任务。若只想以其中一个为准,请将另一个设为 *。

常见问题

What time zone does cron use?

The time zone of the server or the CRON_TZ setting, which is often UTC. This explainer lists runs in UTC; convert them with the UTC time converter if your server uses local time.

How do I run a job every weekday at 9 a.m.?

Use 0 9 * * 1-5: minute 0, hour 9, any day of the month, any month, Monday to Friday.

Does it support seconds or the Quartz ? and L symbols?

No. It reads the standard five-field crontab format; six- and seven-field Quartz or Spring expressions need a different tool.

故障排除

It says the expression must have five fields.

Separate the fields with single spaces and remove any command text after the schedule.

It says the schedule never runs.

Check impossible dates, such as day 30 or 31 in February, or day 31 in a 30-day month only.

隐私 & 免费使用

我的输入会被保存吗?

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

这个工具免费吗?

是的。无需注册或付费。

在浏览器中处理

推荐下一步