Quartz Scheduler Tutorial

Quartz, is a open source job scheduling framework, that let you scheduler a task to run on a predefine date and time. Happy learning Quartz 🙂

1. Quick Start

Hello world to Quartz scheduler frameworks.

  • Quartz 1.6 hello world example
    The old and popular Quartz 1.6.3, legacy system may still using this.
  • Quartz 2 hello world example
    Latest Quartz 2.1.5 example, many APIs changed.
  • Quartz 2 JobListener example
    Create a listener class and keep track the running jobs status.
  • Multiple Jobs In Quartz
    Declares and run multiple jobs in Quartz.
  • List All Jobs In Quartz
    List all the existing jobs in Quartz.
  • Trigger A Quartz Job Manually
    JSF2 example, display all jobs and fire a specified job manually.

2. Integration

Some common Quartz integration with other frameworks.

  • Spring 3 + Quartz 1.8 scheduler example
    Spring 3 doesn’t support Quartz 2, but you still can use Quartz 1.x
  • JSF 2 + Quartz 2 scheduler example
    Uses QuartzInitializerListener to integrate with JSF, in fact, you can use this class to integrate almost any of the Java web frameworks.
  • Struts 2 + Quartz 2 scheduler example
    Integrate Quartz 2 with Struts 2 directly.
  • Struts 2 + Spring 3 + Quartz 1.8 scheduler example
    Integrate Quartz 1.8 with Struts 2 via latest Spring 3.
  • Struts 2 + Spring 2.5.6 + Quartz 1.6 scheduler example
    Integrate Quartz 2 with Struts 1.6 via Spring 2.5.6.
  • Struts 1 + Quartz 2 scheduler example
    Integrate Quartz 2 with Struts 1.x directly.
  • Struts 1 + Spring 2.5.6 + Quartz 1.6 scheduler example
    Integrate Quartz 1.6 with Struts 1.x via Spring 2..5.6, a common combination in many old systems.

3. Common Errors

  • IncompatibleClassChangeError : JobDetailBean has interface org.quartz.JobDetail as super class
  • java.lang.ClassNotFoundException: org.springframework.transaction.TransactionException
  • Quartz : org.quartz.SchedulerConfigException: Thread count must be > 0
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s