Uses of the Quartz Listeners

Armed with all this information, what can you do with these listeners? Actually, you can do quite a bit. First, it's worth noting that, internally, Quartz uses these listeners to help manage the Scheduler and your jobs and triggers. The framework also includes a couple plug-ins that implement the listener interfaces that log all job and trigger history: org.quartz.plugins.history.LoggingJobHistoryPlugin and org.quartz.plugins.history.LoggingTriggerHistoryPlugin, respectively. We talk about Quartz plug-ins in the next chapter.

Here are a few uses for listeners:

  • Catching misfires and rescheduling
  • Sending an e-mail after successful completion of a job
  • Vetoing job execution based on certain flags set up in the database
  • Scheduling other jobs based on successful or failed completion of a job
  • Recording the actual time a job runs

These are only a few ideas. Quartz listeners provide a way for you to be notified programmatically when specific events take place during the runtime of your Quartz application. What you choose to do with that knowledge, if anything, is entirely up to you.

Scheduling in the Enterprise

Getting Started with Quartz

Hello, Quartz

Scheduling Jobs

Cron Triggers and More

JobStores and Persistence

Implementing Quartz Listeners

Using Quartz Plug-Ins

Using Quartz Remotely

Using Quartz with J2EE

Clustering Quartz

Quartz Cookbook

Quartz and Web Applications

Using Quartz with Workflow

Appendix A. Quartz Configuration Reference

Quartz Job Scheduling Framework(c) Building Open Source Enterprise Applications
Quartz Job Scheduling Framework: Building Open Source Enterprise Applications
ISBN: 0131886703
EAN: 2147483647
Year: N/A
Pages: 148 © 2008-2020.
If you may any questions please contact us: