简体   繁体   中英

Cron trigger issue with Quartz

Can anyone tell me if a Cron expression of 1 0 * * * ? will mean that a Quartz job in Java runs at one second past the hour, every hour?

I always seem to get these wrong.

Yes, one second past the hour, every hour, but you're missing a * .

The parameters for a cron line in quartz are:

  • seconds of hour (0-59)
  • minute of hour (0-59)
  • hour of day (0-23)
  • day of month (1-31)
  • month of year (1-12)
  • day of week (1-7, 7 is Saturday)
  • (optional) year

So you would need six or seven values:

1 0 * * * *

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM