Examples Overview

本文提供了Quartz调度器的详细概述,包括最新版本中包含的13个预装示例程序,这些示例展示了Quartz的各种特性和API使用方法。从简单的任务调度到高级特性如触发器、参数传递、异常处理等,每个示例都配有执行脚本和README指南,帮助开发者快速上手。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

Where to Find the Examples

All of the examples listed on here 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 a 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...

The Examples

Example 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值