Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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...