0
votes

I am trying to implement a Job Management module for one of the requirement and came across ScheduleJobInfo as part of the Apache Sling eventing framework. Just wondering if a Job created with a ScheduleJobBuilder can be queried through JobManager interface. If I understands jobs added through JobManager are qued up based on the topics. Would like to understand if I can check the status of Jobs through the ScheduleBuilder interface.

I am using Apache sling version 8 API

Thanks

1

1 Answers

0
votes

Would like to understand if I can check the status of Jobs through the ScheduleBuilder interface.

You can't check the status of a scheduled job through the ScheduleBuilder API. This API only allows to schedule/suspend jobs.

In order to check the status of a scheduled job, you would need to use the regular JobManager API.

Indeed, regular jobs are queued when the schedule is reached. Quoting the scheduled jobs section of the Sling documentation:

When the scheduled time is reached, the job is automatically added as regular Sling Job through the JobManager.