简体   繁体   English

Apache Sling ScheduledJobInfo

[英]Apache Sling ScheduledJobInfo

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. 我正在尝试为其中一项要求实现作业管理模块,并遇到ScheduleJobInfo作为Apache Sling事件框架的一部分。 Just wondering if a Job created with a ScheduleJobBuilder can be queried through JobManager interface. 只是想知道是否可以通过JobManager接口查询使用ScheduleJobBuilder创建的作业。 If I understands jobs added through JobManager are qued up based on the topics. 如果我理解通过JobManager添加的作业将根据主题进行排队。 Would like to understand if I can check the status of Jobs through the ScheduleBuilder interface. 想了解我是否可以通过ScheduleBuilder界面检查Jobs的状态。

I am using Apache sling version 8 API 我正在使用Apache sling版本8 API

Thanks 谢谢

Would like to understand if I can check the status of Jobs through the ScheduleBuilder interface. 想了解我是否可以通过ScheduleBuilder界面检查Jobs的状态。

You can't check the status of a scheduled job through the ScheduleBuilder API. 您无法通过ScheduleBuilder API检查计划作业的状态。 This API only allows to schedule/suspend jobs. 该API仅允许计划/暂停作业。

In order to check the status of a scheduled job, you would need to use the regular JobManager API. 为了检查预定作业的状态,您需要使用常规的JobManager API。

Indeed, regular jobs are queued when the schedule is reached. 确实,当计划完成时,常规作业就排队了。 Quoting the scheduled jobs section of the Sling documentation: 引用Sling文档中的“ 计划的作业”部分:

When the scheduled time is reached, the job is automatically added as regular Sling Job through the JobManager. 达到预定时间后,该作业将通过JobManager自动添加为常规吊带作业。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM