Objective

How can we disable an Apache Sling scheduler service  from running?

Environment

AEM 6.x

Steps

The proper way to disable custom schedulers is to have a boolean configuration flag in the code that tells the scheduler to exit out immediately instead of doing any work.

However, if you urgently need to prevent a scheduler from running you can create a special OSGi configuration.  For each of the schedulers you want to disable, set scheduler.period=-1 and scheduler.expression to an empty value. For example, see the sample configurations below.

.cfg format configuration:
scheduler.period=-1
scheduler.expression=

.config file format configuration:
scheduler.period=L"-1"
scheduler.expression=""

تم ترخيص هذا العمل بموجب الترخيص العام غير المعدل الخاص بالإسناد وعدم التجارة والمشاركة الإصدار 3.0 ‏من ‏‏Creative Commons‏‏  إن بنود Creative Commons لا تشمل منشورات Twitter™‎ وFacebook.

إشعارات قانونية   |   سياسة الخصوصية على الإنترنت