【问题标题】:When jobExecutionVetoed of JobListener will be execured in Quartz Scheduler?JobListener 的 jobExecutionVetoed 什么时候会在 Quartz Scheduler 中执行?
【发布时间】:2013-05-15 14:51:51
【问题描述】:

JobListener 的 jobExecutionVetoed 什么时候会在 Quartz Scheduler 中执行? jobExecutionVetoed 方法有什么用??

【问题讨论】:

    标签: java quartz-scheduler


    【解决方案1】:

    假设我们有工作 J 并触发 T。

    我们在 TriggerListener vetoJobExecution() 中有一个方法。此方法在触发器刚刚触发时执行。所以,有了这个,我们可以控制 是执行还是关闭与触发器关联的作业。如果我们想解雇这个工作,那么我们应该从这个方法中返回 true。

    一旦我们从这个方法返回,我们的joblistener中的“jobExecutionVetoed()”方法将被执行,以暗示该作业执行已被禁止(否决)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多