Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Creating a "polling service" in Java for AEM 6.5.6

Avatar

Level 2

Hi All,
Is it possible to create a polling service in Java for AEM 6.5.6 which would run at regular intervals (for example once per minute).
Intention is to use to polling service to receive data from Amazon SQS.
Thank you for your time and advise.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor

Hi, It seems Schedulers can do this, please check - https://medium.com/adobetech/aem-6-4-creating-a-scheduler-using-osgi-r6-annotations-4ad0b8c6fce7, it should work for AEM 6.5 too. 

This cron expression should work for you - 0 0/1 * 1/1 * ? *

 

Hope this is what you were looking for.

 

More - https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc/or...

https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/core/src/main/java/cor...