Quartz cronSchedule for running with an interval greater than one hour

Asked

Viewed 182 times

3

I’m looking to do a cronSchedule of Quartz like this

cronSchedule("0 0/5 * 1/1 * ? *")

but it’s around every 5 minutes example

7:05, 7:10, 7:15, ... and so on

What I need is this

7:05, 8:10, 9:15, ... and so on

(one hour and five minutes break)

  • You can do it using the cronSchedule?
  • 1

    Need to be with cronSchedule? I would use simpleSchedule().withIntervalInMinutes(65).repeatForever()

  • Currently I do in the form you suggested, I wanted to do the other way to standardize on only one resource (a way to parameterize all Jobs)

  • Honestly, I think the standardization in this case will not be worth it. Expressions cron use fixed intervals per unit, as far as my knowledge goes you will need to write multiple expressions to get the same result from simple Trigger above.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.