Hi Team,
I am not able to get org.apache.sling.jobs.JobManager. I can only able to find org.apache.sling.event.jobs.Jobmanager.
But in below sling documentation i read that we can import sling.jobs.JobManager,
And i am not able to schedule jobs using publisher and consumer approach. Kindly let me know how to use JobManager.addjob().schedule.
Views
Replies
Total Likes
To schedule Jobs using the Sling API - you use APIs such as:
https://sling.apache.org/apidocs/sling7/org/apache/sling/commons/scheduler/Scheduler.html
You use Dependency injection to inject a Scheduler service. See this community to learn how to build an OSGi service that schedule AEM JOBs;
Views
Replies
Total Likes
Hi smacdonald2008,
Thank you for your answer. But could you please guide me how to achieve "Guarantee of Processing" if I use runnable to schedule the job.
Views
Replies
Total Likes
Views
Replies
Total Likes
To Guarantte the process you have to use Job Processor API.
Views
Replies
Total Likes
Please refer to https://techrevel.blog/2023/11/06/enhancing-efficiency-and-reliability-by-sling-jobs/#scheduled-jobs
It has the relevant code snippet.
We need to use org.apache.sling.event.jobs.JobManager instead of org.apache.sling.jobs.JobManager.
Views
Replies
Total Likes
Views
Likes
Replies