Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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??

like image 258
Suren Raju Avatar asked May 15 '13 14:05

Suren Raju


People also ask

How do you trigger multiple jobs in quartz scheduler?

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.

How does Quartz Scheduler work internally?

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.

How do you reset Quartz scheduler?

Just delete your scheduler object after schedulerBean. Shutdown() and call your scheduler method again as you did it first time.


1 Answers

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).

like image 78
CourseTriangle Avatar answered Nov 15 '22 19:11

CourseTriangle