Turn Off AEM Scheduler Manually | Community
Skip to main content
Level 3
June 22, 2023
Solved

Turn Off AEM Scheduler Manually

  • June 22, 2023
  • 1 reply
  • 1451 views

I am following this tutorial on creating a scheduler: https://kiransg.com/2021/11/07/aem-scheduler-best-practices/ 

 

@ObjectClassDefinition(name="A scheduled task", description = "Simple demo for cron-job like task with properties")
public @interface SimpleScheduledTaskConfig {
 
    @AttributeDefinition(name = "Cron-job expression")
    String schedulerExpression() default "*/30 * * * * ?";
 
    @AttributeDefinition(name = "Concurrent task", description = "Whether or not to schedule this task concurrently")
    boolean schedulerConcurrent() default false;
 
    @AttributeDefinition(name = "A parameter", description = "Can be configured in /system/console/configMgr")
    String myParameter() default "";
 
    @AttributeDefinition(name = "Enabled", description = "True, if scheduler service is enabled", type = AttributeType.BOOLEAN)
    public boolean enabled() default true;
}
 
 

In it, it mentioned the interface should have an enabled() field as boolean so the scheduler can be turned off. I was wondering how to turn it off the scheduler? Is there a way to turn it off through the aem portal?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VijayChintapalli

Hi @aemuser2345 ,

 

To turn of the scheduler manually, try following the steps below :
1. Got to /system/console/configMgr.

2. Search for your scheduler(from above example it should be "A scheduled task").

3. Open the config and uncheck the field labelled "enabled".

4. That should turn off the scheduler.

 

I'm attaching a screenshot of a sample scheduler with the enabled field which should be turned off.


1 reply

VijayChintapalliAdobe EmployeeAccepted solution
Adobe Employee
June 22, 2023

Hi @aemuser2345 ,

 

To turn of the scheduler manually, try following the steps below :
1. Got to /system/console/configMgr.

2. Search for your scheduler(from above example it should be "A scheduled task").

3. Open the config and uncheck the field labelled "enabled".

4. That should turn off the scheduler.

 

I'm attaching a screenshot of a sample scheduler with the enabled field which should be turned off.


Level 3
June 22, 2023

Thanks for the quick reply @vijaychintapalli. Do I need to have this "SimpleScheduledTaskConfig" interface inherit to the scheduler in order for it to show up on this endpoint: /system/console/configMgr?

Adobe Employee
June 22, 2023

You would need @ObjectClassDefinition annotation for that to show up under /system/console/configMgr.

 

Thanks,

Vijay