Quartz_2.2.X学习系列十三:Quartz Examples

Examples Overview

Examples Overview

Welcome to the documentation for the Quartz Example programs. As of version 1.5, Quartz ships with 13 out-of-the-box examples that demonstrate the various features of Quartz and the Quartz API.

 

欢迎来到Quartz示例程序的文档。在版本1.5中,Quartz附带了13个开箱即用的示例,演示了Quartz和Quartz API的各种特性。

 

Where to Find the Examples

All of the examples listed below are part of the Quartz distribution.

To download Quartz, visit http://www.quartz-scheduler.org/download and select the latest Quartz distribution.

The quartz examples are listed under the examples directory under the main Quartz directory. Under the examples directory, you will find an example sub-directory for each example, labeled example1, example2, example3 etc…

Every example contains UNIX/Linux shell scripts for executing the examples as well at Windows batch files. Additionally, every example has a readme.txt file. Please consult this file before running the examples.

The source code for the examples are located in package org.quartz.examples. Every example has its own sub-package, org.quartz.examples.example1, org.quartz.examples.example2, etc…

Here we give an overview of each example program:

 

下面列出的所有示例都是Quartz发行版的一部分。

要下载Quartz,请访问http://www.quartz-scheduler.org/download并选择最新的Quartz发行版。

Quartz示例是在主Quartz目录下的示例目录下列出的。在范例目录下,您将为每个例子找到一个示例子目录,标记为example1、example2、example3等等。

每个例子都包含unix/linux shell脚本用于执行这些示例,与及用于在Windows的批处理文件来执行示例。此外,每个例子都有一个readme.txt文件。在运行示例之前,请查阅此文件。

示例的源代码位于org.quartz.examples中。每个例子都有它自己的子包,org.quartz.examples.example1, org.quartz.examples.example2,等等……

在这里,我们概述了每个示例程序:

 

The Examples

</thead> </tr> </table>

Title

Description

Example 1 - First Quartz Program

Think of this as a "Hello World" for Quartz

Example 2 - Simple Triggers

Shows a dozen different ways of using Simple Triggers to schedule your jobs

Example 3 - Cron Triggers

Shows how Cron Triggers can be used to schedule your job

Example 4 - Job State and Parameters

Demonstrates how parameters can be passed into jobs and how jobs maintain state

Example 5 - Handling Job Misfires

Sometimes job will not execute when they are supposed to. See how to handle these Misfires

Example 6 - Dealing with Job Exceptions

No job is perfect. See how you can let the scheduler know how to deal with exceptions that are thrown by your job

Example 7 - Interrupting Jobs

Shows how the scheduler can interrupt your jobs and how to code your jobs to deal with interruptions

Example 8 - Fun with Calendars

Demonstrates how a Holiday calendar can be used to exclude execution of jobs on a holiday

Example 9 - Job Listeners

Use job listeners to have one job trigger another job, building a simple workflow

Example 10 - Using Quartz Plug-Ins

Demonstrates the use of the XML Job Initialization plug-in as well as the History Logging plug-ins

Example 11 - Quartz Under High Load

Quartz can run a lot of jobs but see how thread pools can limit how many jobs can execute simultaneously

Example 12 - Remote Job Scheduling using RMI

Using Remote Method Invocation, a Quartz scheduler can be remotely scheduled by a client

Example 13 - Clustered Quartz

Demonstrates how Quartz can be used in a clustered environment and how Quartz can use the database to persist scheduling information

Example 14 - Trigger Priorities

Demonstrates how Trigger priorities can be used to manage firing order for Triggers with the same fire time

Example 15 - TC Clustered Quartz

Demonstrates how Quartz can be clustered with Terracotta, rather than with a database

 

说明:第12-15例略。

From <http://www.quartz-scheduler.org/documentation/quartz-2.2.x/examples/>

猜你喜欢

转载自blog.csdn.net/arnolian/article/details/82556550