When jobExecutionVetoed of JobListener will be execured in Quartz Scheduler?? What is the use of jobExecutionVetoed method??
If you want to schedule multiple jobs in your console application you can simply call Scheduler. ScheduleJob (IScheduler) passing the job and the trigger you've previously created: IJobDetail firstJob = JobBuilder.
Quartz scheduler allows an enterprise to schedule a job at a specified date and time. It allows us to perform the operations to schedule or unschedule the jobs. It provides operations to start or stop or pause the scheduler. It also provides reminder services.
Just delete your scheduler object after schedulerBean. Shutdown() and call your scheduler method again as you did it first time.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With