DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How To Create Asynchronous and Retryable Methods With Failover Support
  • Clustered Quartz Scheduler With Spring Boot and MongoDB

Trending

  • Code Quality Had 5 Pillars. AI Broke 3 and Created 2 We Can’t Measure
  • Stop Writing Dialect-Specific SQL: A Unified Query Builder for Node.js
  • Building a Skill-Based Agentic Reviewer with Claude Code: A Practical Guide Using Skills.MD, MCP Servers, Tools, and Tasks
  • Content Lakes: Harness Unstructured Data for Enterprise AI Readiness
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Maintenance
  4. How to Manage Quartz Remotely

How to Manage Quartz Remotely

By 
Zemian Deng user avatar
Zemian Deng
·
Sep. 14, 12 · Interview
Likes (0)
Comment
Save
Tweet
Share
23.3K Views

Join the DZone community and get the full member experience.

Join For Free

Option 1: JMX

Many people asked can they manage Quartz via JMX, and that the documentation on this is not clear enough to help them get started. So, let me highlight couple ways you can do this.

Yes you can enable JMX in quartz with the following in quartz.properties

org.quartz.scheduler.jmx.export = true

After this, you use standard JMX client such as $JAVA_HOME/bin/jconsole to connect and manage remotely.

Option 2: RMI

Another way to manage quartz remotely is to enable RMI in Quartz. If you use this, you basically run one instance of Quartz as RMI server, and then you can create second Quartz instance as RMI client. These two can talk remotely via a TCP port.

For server scheduler instance, you want to add these in quartz.properties

org.quartz.scheduler.rmi.export = true
org.quartz.scheduler.rmi.createRegistry = true
org.quartz.scheduler.rmi.registryHost = localhost
org.quartz.scheduler.rmi.registryPort = 1099
org.quartz.scheduler.rmi.serverPort = 1100

 

And for client scheduler instance, you want to add these in quartz.properties

org.quartz.scheduler.rmi.proxy = true
org.quartz.scheduler.rmi.registryHost = localhost
org.quartz.scheduler.rmi.registryPort = 1099

The RMI feature is mentioned in Quartz doc here. Quartz doesn't have a client API, but use the same org.quartz.Scheduler for both server and client. It's just the configuration are different. By different configuration, you get very different behavior. For server, your scheduler is running all the jobs, while for client, it's simply a proxy. Your client scheduler instance will not run any jobs! You must be really careful when shutting down client because it does allow you to bring down the server!

These configurations have been highlighted in the MySchedule project. If you run the webapp, you should see a screen like this demo, and you will see it provided many sample of quartz configurations with these remote managment config properties.

If configure with RMI option, you can actually still use MySchedule web UI to manage the Quartz as proxy. You can view and drill down jobs, and you can even stop or shutdown remote server!

Based on my experience, there is a down side of using Quartz RMI feature though. That is it creates a single point of failure. There is no fail over if your RMI server port is down!

Quartz (scheduler)

Published at DZone with permission of Zemian Deng. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How To Create Asynchronous and Retryable Methods With Failover Support
  • Clustered Quartz Scheduler With Spring Boot and MongoDB

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook