Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

300
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda