http://liuzidong.iteye.com/blog/1147528
The jobexecutionexception of quartz
Blog Category:
Quartzjobexecutionexceptionjavazero
1 What happens if your task execution is wrong ?
Quartz offers two ways to solve the problem
1 re-execute the task now
2 immediately stop all triggers related to this task
question 2 How to do it?
Quartz's solution is
The Jobexecutionexception class-related method provided by Quartz is a good solution when your program goes wrong .Question: What do I do if I want to perform a task when the Web container starts?
Quartz: You can do it with Quartzinitializerlistener.
Please note that the priority level is higher than quartzinitializerservlet
The parameters that can be configured in Web. XML are as follows:
Such as:
Java code
- <context-param>
- <param-name>quartz:config-file</param-name>
- <param-value>/quartz.properties</param-value>
- </context-param>
Trigger Monitor Triggerlistener
Quartz Triggerlistener Trigger Listener
As the name implies: the listener triggers
Quartz Scheduler can set up a listener for trigger to monitor the various states of the trigger, respectively.
Implementing the listener requires implementing the Triggerlistener interface and registering it on the scheduler.
"Quartz" Using Joblistener (Task Listener can be implemented) I want to do a second task after a task is executed.