Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
How to implement Quartz Exponential Backoff strategy?

Currently my quartz job is triggered in this way:

  • When first schedule the job, the job will be triggered after 5 mins.
  • The job will be triggered 5 times, with the time interval 2 mins.

So if I schedule my job at time1, the job will be executed at time1 + 5, time1 + 7, time1 + 9, time1 + 11, time1 + 13

  private org.quartz.Trigger makeTrigger() {
    org.quartz.ScheduleBuilder<org.quartz.SimpleTrigger> scheduleBuilder =
        org.quartz.SimpleScheduleBuilder.simpleSchedule()
            .withIntervalInMilliseconds(intervalMillis)
            .withRepeatCount(repeatCount);

    return org.quartz.TriggerBuilder.newTrigger()
        .withIdentity(key.getLeft(), key.getRight())
        .usingJobData(new org.quartz.JobDataMap(jobData))
        .startAt(dateTimeHelper.toStandardDate(startDateTime))
        .withSchedule(scheduleBuilder)
        .build();
  }

But I need to let the job be less aggressive, so my question is how to set the triggers to have exponential time intervals? So that after I schedule the job at time1, the job will be executed at: time1 + 5, time1 + 7, time1 + 11, time1 + 19, time1 + 35?

Should I reschedule the job every time the job is finished?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!