Scheduler needs to run only once but actually runs more then once on AEM 6.5?
I have configured a scheduler in AEM6.5 and the idea is that it runs ONCE a night at 2AM
@Designate(ocd = TagVerificationScheduledTask.Config.class)
@Component(service = {Runnable.class})
public class TagVerificationScheduledTask implements Runnable {
@ObjectClassDefinition(name = "scheduled task that verifies tags in blog articles",
description = "A scheduled task that verifies tags in blog articles")
public @interface Config {
@AttributeDefinition(name = "Cron-job expression. Default: run every night at 2:00 AM.")
String scheduler_expression() default "0 0 2 * * ?";
The job runs on all three instances (one author and two publishers) and I want it to run on only one instance i.E. author.
How can I configure that?
O tried @Property(name="scheduler.runOn", value="SINGLE"); but it does not work. I also tried @AttributeDefinition(name = "Run On") String scheduler_runOn() default "SINGLE"; but that also did not work.