Hell Suprita.
Please provide you Jmix version.
It looks like result of the misfire instruction.
When trigger is resumed Scheduler checks if it was misfired - was unable to be executed in a proper time.
By default trigger is created with ‘Smart policy’ - in case of misfired trigger it runs once immediately and then rescheduled.
Ability to set misfire instructions to trigger via Add-on UI has been added in Jmix 2.1.
To skip all misfires and just reschedule you need ‘Do nothing’ misfire instruction.
But in older versions trigger is always created with the default value - ‘Smart policy’.
In these version you can configure misfire instruction only if you create job manually via Quartz API:
- Build JobDetails and Trigger via JobBuilder\TriggerBuilder and add them to Scheduler bean. But all of this should be performed within custom code.
- Or create design-time job as beans
For example:
@Bean("project_YourCustomJob")
JobDetail yourCustomJob() {
return JobBuilder.newJob()
.ofType(YourJobClass.class)
.storeDurably()
.withIdentity("UniqueJobName")
.build();
}
@Bean("project_YourCustomJobTrigger")
Trigger yourCustomJobTrigger(@Qualifier("project_YourCustomJob") JobDetail yourCustomJob) {
return TriggerBuilder.newTrigger()
.withIdentity("UniqueTriggerName")
.forJob(yourCustomJob)
.startNow()
.withSchedule(
CronScheduleBuilder
.cronSchedule("<your cron expression>")
.withMisfireHandlingInstructionDoNothing()
).build();
}
Regards,
Ivan