Expand my Community achievements bar.

SOLVED

How to trigger only overriding scheduler, not OOTB scheduler

Avatar

Employee Advisor

I am overriding the Out of the box AEM scheduler and name of the scheduler is ExpiryNotificationJobImpl.

 

Details of OOTB scheduler ExpiryNotificationJobImpl has been given below -

1. package : com.day.cq.dam.core.impl

2. bundle : com.day.cq.dam-dam-core

3. No service rank was defined here

 

I have overridden ExpiryNotificationJobImpl scheduler with higher service rank as you could see below -

 

DEBAL_DAS_0-1639476688493.png

After overriding and deployment , I am using similar cron expression to check which one will be triggered. But noticed both are getting triggered simultaneously.

 

I have added one message in overriding scheduler to identify my overriding scheduler easily. Even log file is showing both are getting triggered.

 

My plan is to trigger only overriding scheduler not OOTB one.

 

Please suggest.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @DEBAL_DAS, did you consider to use component disabler from ASC Commons [1] to disable OOTB ExpiryNotificationJobImpl component? This could be the easiest way to achieve what you want.

[1] - https://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disablers/component-disabl...

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @DEBAL_DAS, did you consider to use component disabler from ASC Commons [1] to disable OOTB ExpiryNotificationJobImpl component? This could be the easiest way to achieve what you want.

[1] - https://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disablers/component-disabl...

Avatar

Employee Advisor

Hi @lukasz-m ,

 

Thanks for your input. I was able to disable OOTB ExpiryNotificationJobImpl using component disabler from ASC Commons.

 

As OOTB ExpiryNotificationJobImpl  is part of Adobe AEM so, I have to be very careful before disabling it.

It is also mentioned in that link "If this component is part of Adobe AEM please raise a Daycare ticket for it."

I have tried with service.ranking but didn't work at all. Not sure it is a limitation for scheduler or not

[https://issues.apache.org/jira/browse/SLING-2920].

 

I am marking this as fixed.