Expand my Community achievements bar.

SOLVED

CQ Scheduler not firing the scheduled job - on server restart

Avatar

Level 1

Hi All,

Please help me with below issue.

we are using CQ Scheduler to fire a job on specific time but when we restart the server - then the scheduler is not running the job when the time reached.

Details: Example:

We are setting an event today and scheduling remainder emails to be send to the users on 21st March which tomorrow. but if we restart the server today then it losing the scheduled tasks and not firing the emails to users. if we do not restart then it is working fine and triggering emails on specified date and time. we had to go server restart when we have deployments. if any jobs scheduled in future and server restarted then the scheduler is losing the scheduled jobs.  please help me to solve this issue. is there any configuration required on server or any thing required to change in the code.?

1 Accepted Solution

Avatar

Correct answer by
Level 10
5 Replies

Avatar

Level 2

It would be helpful to answer your question if you show your code/expression that schedule the scheduler.

Thanks,

Rakesh

Avatar

Correct answer by
Level 10

See this article for information on scheduling and AEM:

http://helpx.adobe.com/experience-manager/using/aem-first-components1.html

Avatar

Community Advisor

HI smacdonald2008

          Scott, Can we update this Adobe Experience Manager Help | Scheduling Adobe Experience Manager Jobs using Apache Sling

article as the addJob method in the Scheduler API is deprecated now . Scheduler ("The Adobe AEM Quickstart and Web Application.")

1338079_pastedImage_0.png

     I believe we should be taking the WHITEBOARD PATTERN approach as mentioned in this article. Scheduler | CQ5 AEM Tricks of Trade .

Thanks

Veena

Avatar

Level 10

I will update. Thanks for pointing out!!

Avatar

Level 2

Hi smacdonald2008​,

  I am in the process of upgrading the AEM code from 5.6 to 6.3. I have lot of scheduler which is using deprecated methods in schedular. Do you have the sample example for using the scheduler using schedule method? please share with us if you have any

thanks

Pavan