Use quartz for Job Scheduling

Source: Internet
Author: User
Tags websphere application server

 

Use quartz for Job Scheduling

 

Quartz API is used in JavaProgramTask Scheduling

Introduction:Quartz is an open source project that provides a wide range of Job Scheduling sets. In this articleArticleSoftware Engineer Michael Lipton and IT architect soobaek Jang introduced the quartz API, starting from a general overview of the framework and presenting a series of basic features of quartCodeThe example ends. After reading this article and reading the sample code, you should be able to apply the basic features of quartz to any Java application.

 

Modern web application frameworks have developed in terms of scope and complexity. Each underlying component of an application must also develop accordingly. Job Scheduling is a general requirement for Java applications in modern systems and is also a consistent requirement for Java developers. Although the current scheduling technology has developed much more than the original database trigger mark and independent scheduler thread, Job Scheduling is still not a small problem. The most suitable solution for this problem is the quartz API of opensymphony.

Quartz is an open-source job scheduling framework that provides a simple but powerful mechanism for Job Scheduling in Java applications. Quartz allows developers to schedule jobs by time interval (or day. It realizes the many-to-many relationship between jobs and triggers, and can associate multiple jobs with different triggers. Applications integrated with quartz can reuse jobs from different events and combine multiple jobs for one event. You can configure quartz through the attribute file (in the attribute file, you can specify the data source, global job, and/or trigger listener, plug-in, thread pool, and more for JDBC transactions, however, it is not integrated with the context or reference of the application server at all. The result is that the job cannot access the internal functions of the Web server. For example, when using the WebSphere Application Server, Jobs scheduled by quartz cannot affect the dynamic cache and data sources of the server.

This article uses a series of code examples to introduce the quartz API and demonstrate its mechanism, such as job, trigger, job repository, and attributes.

Click linkRead this article

Summary

The APIS provided by the quartz job scheduling framework provide excellent performance in both aspects: comprehensive and powerful, and easy to use. Quartz can be used for simple job triggering or for complex JDBC persistent job storage and execution. Opensymphony successfully fills a gap in the Open Source world. The tedious job scheduling in the past is nothing more than a piece of cake for developers.

 

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.