Quartz is a full-featured, open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components or EJBs.
- Integrating Quartz with the framework requires some glue code.
Coding a Quartz ActionJob
To schedule Actions to be run by Quartz, create a Job where
- The name of your job is the name of the Action to execute (no ".action" equivalent suffix).
- All the parameters being sent to the Action are provided by the JobDataMap of the JobDetail object.
According to the Javadocs of
org.quartz.ee.servlet.QuartzInitializerServlet, the Quartz scheduler is setup as a servlet.
Sample Quartz Email Action
The following code schedules an e-mail action: