Why you shouldn't use Quartz Scheduler
If you need to schedule jobs in Java, it is fairly common in the industry to use Quartz directly or via Spring integration. Quartz’ home page at the time of writing claims that using quartz is a simple 3-step process: Download, add to app, execute jobs when you need to. For any of you that actually have experience with Quartz, this is truly laughable.
First of all, adding the quartz library to your app does not begin to
ready your application to schedule jobs. Getting your code to run in a
schedule with quartz is anything but straightforward. You have to write
your implementation of the job interface, then you have to construct
large xml configuration files or add code to your application to build
new instances of JobDetails, Triggers using complex api such as
and then schedule them using Schedule instance from a ScheduleFactory. All this is code you have to write for each job or the equivalent xml configuration. Quite the headache for something that was supposed to simply be “execute jobs when you need to”. Even in Quartz’ tutorial, it takes 6 lessons to setup a job. What happens when you need to make a change to a job’s schedule? Temporarily disable a job? Change the parameters bound to a job? All these require a build/test/deploy cycle which is impractical for any organization.
Quartz is also deficient in its feature set. Out of the box, it is just a code library for job execution. No monitoring console for reviewing errors and history, no useful and reasonably searchable logging, no support for multiple execution nodes, no adminstration interface, no alerts or notifications, inflexible and buggy recovery mechansims for failed jobs and missed jobs.
Quartz does provide add-on support for multiple nodes, but it requires additional advanced configuration. Quartz also provides an add-on called Quartz Manager, it too needs additional advanced configuration, is a flash app and is incrediby cumbersome and impractical to use.
Simply put, Quartz doesn’t meet these basic needs:
- No out of the box support for multiple execution nodes (pooling or clustering)
- No adminstration UI that allows all job scheduling and configuration to be done outside of code
- No monitoring
- No alerts
- Insufficient mechanisms for dealing with errors/failures and recovery
All this means Quartz is not really a justifiable choice as an enterprise scheduler. It is feature poor and has high implementation and ongoing utilization costs in terms of time and energy.
Obsidian Scheduler really is the best choice for your java-based applications. You truly can be up and running the same day you download it. We have a live, interactive demo where you can try out the interface and see first-hand how easy it is to add/change/disable jobs, to monitor all the node activity, disable/enable nodes and even take advantage of advanced schedule configuration such as chaining and sticky nodes.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)