Job reschedule itself after completion using Quartz

I want to run a job and, as soon as it finishes, it should start again, forever.

How can I manage this using Quartz?

Further information will be provided if requested.



you’ll want to look at the TriggerBuilder which can build a trigger with repeatsForever() to get a repeating job.

     JobDetail job = newJob(MyJob.class)

     Trigger trigger = newTrigger() 
         .withIdentity(triggerKey("myTrigger", "myTriggerGroup"))
         .startAt(futureDate(10, MINUTES))

     scheduler.scheduleJob(job, trigger);

Leave a Reply

Your email address will not be published. Required fields are marked *