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.
조회 수
답글
좋아요 수
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;
조회 수
답글
좋아요 수
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.
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
To Guarantte the process you have to use Job Processor API.
조회 수
답글
좋아요 수
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.
조회 수
답글
좋아요 수
조회 수
Likes
답글