AEM Job Scheduler is running multiple times on AEM cloud
Hi,
As the title stated, A job scheduler I created that was deployed on AEM cloud is running multiple times. No issues on my local only on AEM cloud this happens.
Below is the code snippet of my scheduler:
@8220494(immediate = true,
service = SchedulerJob.class,
property = {"scheduler.runOn=LEADER",
"scheduler.concurrent=false"})
public class SchedulerJob implements Runnable {
@580286
protected void activate() {
// activate logic below
}
@3038739
protected void deactivate() {
// deactivate logic below
}
@9944223
public void run() {
// run logic below
}
private void scheduleJob(String jobExpression) {
// scheduleJob logic below
}
private void unscheduleJob() {
// unscheduleJob logic below
}
}To some I've seen they were able to resolved their issue by adding the props "runOn and concurrent" which I already added to my code but I'm still encountering the issue. Any help is greatly appreciated, thanks!