How can I force remove an item in the slingscheduler? | Community
Skip to main content
New Participant
September 22, 2022
Solved

How can I force remove an item in the slingscheduler?

  • September 22, 2022
  • 4 replies
  • 945 views

I have a job in the /system/console/status-slingscheduler. 

Job : PIM Menu cache scheduler, class: com.mybrand.SchedulerService, concurrent: false, bundleId: 200
Trigger : Trigger 'DEFAULT.schedular service scheduler':  triggerClass: 'org.quartz.impl.triggers.CronTriggerImpl calendar: 'null' misfireInstruction: 0 nextFireTime: Thu October 30 16:22:00 UTC 2022

 How do force remove this from the slingscheduler? It's stuck. I tried to change the cron configurations in OSGI / Config Manager, but it did not change the status of what is being shown in /system/console/status-slingscheduler. 

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 DEBAL_DAS

Are you planning to do it permanently? 

 

As @arunpatidar has mentioned if we stop the Scheduler via http://localhost:4502/system/console/components 

then the relevant job will be removed from /system/console/status-slingscheduler (tested on my local AEM instance).

But once you redeploy your bundle or restart your bundle then again, this Job will be available.

 

4 replies

DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
September 26, 2022

Are you planning to do it permanently? 

 

As @arunpatidar has mentioned if we stop the Scheduler via http://localhost:4502/system/console/components 

then the relevant job will be removed from /system/console/status-slingscheduler (tested on my local AEM instance).

But once you redeploy your bundle or restart your bundle then again, this Job will be available.

 

HeenaMadan
New Participant
September 23, 2022

try  unregister this service from http://localhost:4502/system/console/components

arunpatidar
New Participant
September 23, 2022

Hi,

com.mybrand.SchedulerService is a osgi service, you can unregister this service to terminate existing jobs.

Slingscheduler are not persistent so it must go away once service in unregistered.

you can try stop and start this component from http://localhost:4502/system/console/components 

Arun Patidar
SantoshSai
New Participant
September 22, 2022

Hi @supportmember ,

Not sure if  there is a way to remove scheduler. However, two solutions you can consider

  • You can keep scheduler running and have checkbox OSGI property at the scheduler level. And based on this property, you can decide whether you need execute rest of the code or not.
  • Another option is to write a simple supporting service which will have a checkbox OSGI property and based on chosen option you can schedule or unschedule a scheduler service. Assuming scheduler service is being registered from this supporting service not through OSGI property & cron job.

Hope that helps!

Regards,

Santosh

Santosh Sai