Expected Behaviour:
When using runOnceTrigger the job should fire after the given delay and expire immediately.
Current behaviour:
When using runOnceTrigger with the delay of 5secs, the job is never expired.
Steps to reproduce:
Use the following code to schedule the job in the jobQueue example given in the repository.
if err := scheduler.ScheduleJob(jobDetail1, quartz.NewRunOnceTrigger(5*time.Second)); err != nil {
logger.Warnf("Failed to schedule job: %s", jobDetail1.JobKey())
}
Possible Cause:
The RunOnceTrigger has the expired field as private, because of which we cannot create expired RunOnceTriggers. When using persistent storage, the user needs to serialise and recreate the trigger. Allowing users to create expired RunOnceTrigger can solve the problem.
Expected Behaviour: When using runOnceTrigger the job should fire after the given delay and expire immediately.
Current behaviour: When using runOnceTrigger with the delay of 5secs, the job is never expired.
Steps to reproduce: Use the following code to schedule the job in the jobQueue example given in the repository.
Possible Cause: The RunOnceTrigger has the
expired
field as private, because of which we cannot create expired RunOnceTriggers. When using persistent storage, the user needs to serialise and recreate the trigger. Allowing users to create expired RunOnceTrigger can solve the problem.