Scheduler : example code | Community
Skip to main content
Level 9
October 16, 2015
Solved

Scheduler : example code

  • October 16, 2015
  • 7 replies
  • 1856 views

Hi All,

Can someone please provide a sample code/link as to how the schedulers[a specific job to be scheduled once or at regular intervals within CQ5] are made use of.

I have a sling servlet code that needs to be scheduled.

Have gone through through some links below, but not getting how to implement.

http://chanchal.wordpress.com/2013/06/26/scheduled-and-background-jobs-in-cq5-sling/

http://dev.day.com/content/ddc/blog/2010/02/the_apache_slingsch.html

Any thoughts/pointers will be really helpful.

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 smacdonald2008

Here is the article that addresses this use case:

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

7 replies

smacdonald2008
Level 10
October 16, 2015

We will extend the MBean article into a Sling Scheduler article by Fri of this week (May 23). I will post the link on this thread once done. 

Lokesh_Shivalingaiah
Level 10
October 16, 2015

your references looks good and let us know if you have any specific issues while configuring the schedulers.

 

Use for time interval : this.scheduler.addPeriodicJob(pollerName, job, config, period, canRunConcurrently, startImmediate);

or

Use for specific scheduling expression : this.scheduler.addJob(pollerName, job, config, schedulingExpression, canRunConcurrently);

 

 

~Lok!

askdctmAuthor
Level 9
October 16, 2015

Hi All,

Also, is it possible to directly schedule a bundle , that is installed in CQ.

Any thoughts will be helpful.

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015
askdctmAuthor
Level 9
October 16, 2015

Hi All,.

I did fine one relevant article in the link

http://dev.day.com/content/ddc/blog/2010/02/the_apache_slingsch.html

I have the code on my eclipse and I have the AEM instance too.

However, I am not quite getting as to what should I do further with this..

Any thoughts/pointers will be helpful.

askdctmAuthor
Level 9
October 16, 2015

Hi Jorg/Lokesh,

Thank you for your reply. Sorry for the delayed response.

Yes, the article in the link I was referring was working fine, but I was foolish enough not to observe the logs etc.

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

Hi,

I think that article is fine. What's the specific problem you encountered?

Jörg