You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

每小时第1分钟执行Cron任务的配置问题求助

Correct Cron Configuration for 1 Minute Past Every Hour

Let's break this down for you — you're trying to run a cron job at 1 minute past every hour (0:01, 1:01, ..., 23:01), and your current attempts aren't hitting the mark. Here's what you need to do, depending on which cron syntax you're using:

1. Standard Linux/Unix Cron (5-field syntax)

Standard cron uses the format: minute hour day month weekday

Your correct configuration here is:

1 * * * *
  • 1: Triggers at the 1st minute of the hour
  • *: Matches any hour, day, month, or weekday

This will run exactly at 0:01, 1:01, ..., 23:01 every day.

2. Quartz Cron Expression (7-field syntax, common in Java apps, Jenkins, etc.)

Quartz uses the format: second minute hour day month weekday year (year is optional)

Your correct configuration here is:

0 1 * * * ?

Or with the optional year field included:

0 1 * * * ? *
  • 0: Runs at the 0th second of the target minute
  • 1: Targets the 1st minute of every hour
  • *: Matches any hour, day, or month
  • ?: Avoids conflicts between the "day" and "weekday" fields (we don't want to restrict either here)

Why your previous attempts didn't work

  • Your first config 0 * * * * ? *: Sets the second to 0, but the minute to * (any minute) — so it runs every minute at 0 seconds, not just the 1st minute of each hour.
  • Your second config 0 */1 * * * ? *: Sets the hour to run every 1 hour, but again uses * for minutes — so it runs every minute of every hour at 0 seconds, which isn't what you need.

内容的提问来源于stack exchange,提问作者Sa'ad Qasaymeh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 08:42:22