Piezo and Quartz: a match made in heaven

Eliza Wright

Reading time: about 3 min

Topics:

  • Architecture
  • Open Source
If I should call you up, invest a dime And you say you belong to me and ease my mind Imagine how the world could be, so very fine So happy together

-G. Bonner & A. Gordon, “Happy Together”

 

What’s Missing from Quartz

If you need scheduled tasks on the JVM, Quartz by Terracotta is the standard solution. It has one responsibility that it does well: reliably executing jobs on a defined schedule. Unfortunately, every time you use Quartz, you have to write your own:

  • Java main()

  • Shutdown handler

  • Monitoring & stat tracking

  • Configuration management

If you have run Quartz for a while you have probably realized you need a more robust administration of the cluster. Taking a phone call at 10 pm so you can make changes to a schedule? Sending someone MySQL credentials so they can view the list of schedule jobs? It’s neither fun nor sustainable. Viewing jobs, histories, and scheduled triggers requires a friendlier interface.

Patching it with Piezo

I decided to solve these problems with Piezo, an complete open source job processing solution for Quartz. It provides all of the boilerplate code, plus a bunch of cool admin tools for your Quartz job scheduler.

Use the 5 setup steps on github to be up and running with a Piezo job system in 5 minutes!

Piezo comes with two main components:

1) Piezo Worker - a Java main() driver for a Quartz scheduler, and

2) Piezo Admin - an easy web interface for viewing, adding, editing, and deleting jobs.

The components can be used independently or together to complete your job scheduling solution.

Piezo Worker

Java main()

The Piezo Worker gives you an easy way to run a job scheduler. It’s a Java main() class that lets you easily run a Quartz scheduler instance. It includes a convenient shutdown hook on the SIGINT signal (ctrl-c).

It even provides a default startup script for you to use:

./worker/src/main/resources/run.sh

Job history

One of the major features missing from the Quartz scheduler, even when using a persistent job store, is its lack of historical data about jobs. Piezo extends the standard set of tables in the JDBCJobStore and tracks the start time, stop time, and exit status of every job run by every trigger.

Piezo Admin

Piezo Admin provides a clean, friendly web interface with reactive design for viewing on any device. It is built on the Play Framework with Twitter Bootstrap.

Jobs

See a list of jobs organized by group, details for a job, and a history of when the job was run. The user can also add, edit, and remove jobs from the data store.

Triggers

Triggers can be similarly listed, viewed, and modified.

Try it out

Use the 5 setup steps on github and play with it yourself. The tool is actively supported so let me know of any issues or feature requests.

Related Information

  1. Quartz Scheduler Tutorial by mkyong.com

  2. Quartz.net

About Lucid

Lucid Software is a pioneer and leader in visual collaboration dedicated to helping teams build the future. With its products—Lucidchart, Lucidspark, and Lucidscale—teams are supported from ideation to execution and are empowered to align around a shared vision, clarify complexity, and collaborate visually, no matter where they are. Lucid is proud to serve top businesses around the world, including customers such as Google, GE, and NBC Universal, and 99% of the Fortune 500. Lucid partners with industry leaders, including Google, Atlassian, and Microsoft. Since its founding, Lucid has received numerous awards for its products, business, and workplace culture. For more information, visit lucid.co.

Get Started

  • Contact Sales

Products

  • Lucidspark
  • Lucidchart
  • Lucidscale
PrivacyLegalCookie privacy choicesCookie policy
  • linkedin
  • twitter
  • instagram
  • facebook
  • youtube
  • glassdoor
  • tiktok

© 2024 Lucid Software Inc.