The first major release of the Quartz job scheduler for Java since it was acquired by Terracotta in 2009 includes a fluid, feature-rich API, and improved monitoring and management of job schedules.
Quartz Scheduler is used to make things happen at specific times, such as firing off a batch job. The new version, released this week, introduces the API concept “to make it easier to read and write these scheduled jobs,” said Steve Harris, vice president of engineering at Terracotta. Instead of creating files and piecing them together, the new API works with how people speak, Harris said, as in, “Let me schedule a job every three weeks.”
The job scheduler now also includes Quartz Manager, a Flash-based Web interface that enables users to manage job schedules in both development and production environments. Users can add or delete jobs, see how many jobs are scheduled across each node in the system, and when the jobs are executing. “Quartz has been about the when: When do you execute?” Harris said. “In 2.0, we’re moving to the where.”
A new Quartz Where feature in the job scheduler gives users the ability to control where the jobs are executed, Harris said. “You could scale out jobs in the past, but you had no control over where the jobs executed,” he explained. “Now, when you go from one node to 10, instead of executing randomly in the cluster, you can add constraints, such as, ‘I want this job to always execute on node 10.’ ”
Or, he added, one might want to only execute a job on nodes that have more than 50% of the CPU available. These constraints are set up at programming but used in runtime, he said.
Quartz Scheduler integrates with Terracotta’s flagship product, the Enterprise Ehcache data store, to schedule jobs on nodes that already contain the largest amount of the data required for that job, Harris said.