"Quartz" Using Joblistener (Task Listener can be implemented) I want to do a second task after a task is executed.

Source: Internet
Author: User

http://liuzidong.iteye.com/blog/1147528

The jobexecutionexception of quartz Blog Category:
    • Java
    • Quartz
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
    1. <context-param>
    2. <param-name>quartz:config-file</param-name>
    3. <param-value>/quartz.properties</param-value>
    4. </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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.