How to configure multiple scheduled tasks in quatz in spring

Source: Internet
Author: User

Recently, the company has used the quatz framework for the timing function, and it is really worried to execute multiple timing tasks.

Although I searched a lot of information from the Internet, but the writing method was not satisfactory, I finally asked the crab master, and the configuration advice is simple. Now I will share it with you:

 

Here we need two parts: one is the processing class in java and the other is the quatz configuration file, as shown below:

ApplicationContext_quartz.xml





Configuration file address for quatz: http://www.itxxz.com/a/kuangjia/kuangjiashili/2014/0602/10.html


The corresponding class in java should be noted that the class Job should be inherited, otherwise it will not be executed, the Code is as follows:

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.