Say we have task J and run T.
We have a method in TriggerListener vetoJobExecution (). This method is executed when the trigger starts. Thus, we can thus control the execution or rejection of the task associated with the trigger. If we want to reject the task, we must return true from this method.
As soon as we return from this method, the jobExecutionVetoed () method inside our joblistener will be executed to determine that the job was prohibited (vetoed).
source share