Many organizations need enterprise level clustered application to maintain high availability or perform non-stop jobs. Quartz Scheduler is an excellent option to assist on this.
Quartz Scheduler is a Java-based open source library which is freely available under Apache license 2.0. The latest version is 2.2.3. It requires two components for job scheduling, trigger and job.
Trigger can be cron-expression based time. Job can be the Java implementation of Quartz job interface. Quartz Scheduler manages triggers and jobs through database tables. With the download pack, Quartz offers database schema scripts for 22 databases, from Oracle, SQL Server, MySQL to PostgreSQL, etc.
Quartz Scheduler has a bold feature: supporting clustered instances in master-master mode. Quartz Scheduler requires to run in a container environment, e.g., a JBoss EAP container, Wildfly or Tomcat. When you deploy your application to JBoss for instance, you may launch JBoss standalone while your Quartz Scheduler database configuration points to your designated database schema. In another machine, you may do the same thing, to launch your application which implemented Quartz Scheduler job interface, and of course configure your scheduler point to the same database schema.
Quartz Scheduler watches the jobs registered in its database schema and trigger the jobs based on pre-set trigger which may be based on cron-expression. Quartz Scheduler manages the clustered instance through above database tables. Once an instance is down, another instance will continue on to perform next scheduled job.
This feature is extremely useful to building up high-availability clustered application. This master-master mode clustering feature is also very useful for implementing software load balancer.
Quartz Scheduler also supports Apache Maven so … have fun!
Should you have any questions on how to implement your clustered application using Quartz Scheduler, please feel free to contact us.