1 Quarta Introduction
1. What is quartz?
Quartz is a Java-only job scheduling tool, which is equivalent to job in the database, scheduled job in windows, and cron in Unix/Linux. However, quartz can refine the scheduling control.
2 quartz framework development history
The quartz project was created by James house. In 1998, the initial idea of this framework was introduced, including the concept of Job Queue, which uses thread pools to process jobs, this project was created at SourceForge in the spring of 2001..
Quartz directory structure and content
Docsquartz framework javadoc API instructions
Examples of using quartz in multiple aspects of examples
Third-party packages used by libquartz
Quartz-JBoss provides source code specific to the JBoss features
Quartz-Oracle provides source code specific to Oracle features
Quartz-WebLogic provides source code specific to WebLogic features
Application scenarios of quartz
Scenario #1: email reminders and alarms
Scenario #2: Perform File Transfer
Scenario #3: Create a sales report
Installation and Use of sanquarta
Official Website: http://www.quartz-scheduler.org/download the latest file. You can download it only after registration! You can also download it from the attachment.
4. Understand the quartz Architecture
Quartz provides a high degree of abstraction for the domain issues of task scheduling, and proposes three core concepts: scheduler, task, and trigger. quartz describes important core concepts through interfaces and Classes
The two basic units of the quartz scheduling package are jobs and triggers. A job is an executable task that can be scheduled. A trigger provides scheduling for the job.
Scheduler: The scheduler is used to associate a job with a job trigger. A job can be associated with multiple triggers so that each trigger can be triggered for job execution. A trigger can be used to control multiple jobs, when Triggering,
All jobs are scheduled. The scheduler of quartz is embodied by the scheduler interface.
Job: You only need to implement the org. Quartz. Job interface. The job Interface contains a method execute (). The execute method body is the scheduled job body. Once the job interface and the execute () method are implemented,
When quartz determines the job operation, it will call the execute () method body.
Trigger: There are simpletrigger and crontrigger types