简体   繁体   中英

When jobExecutionVetoed of JobListener will be execured in Quartz Scheduler?

When jobExecutionVetoed of JobListener will be execured in Quartz Scheduler?? What is the use of jobExecutionVetoed method??

Let's say we have a job J and trigger T.

We have a method in TriggerListener vetoJobExecution(). This method is executed when the trigger is just fired. So, with this we can thereby control whether to execute or dismiss the job associated with the trigger. If we want to dismiss the job , then we should return true from this method.

As soon as ,we returned from this method, "jobExecutionVetoed()" method inside our joblistener will be executed to intimate that the job execution has been banned(vetoed).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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