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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Modernizing Apache Spark Applications With GenAI: Migrating From Java to Scala
  • Part 3 of My OCP Journey: Practical Tips and Examples
  • Fun Is the Glue That Makes Everything Stick, Also the OCP
  • Does the OCP Exam Still Make Sense?

Trending

  • You Don't Have to Pick One: A Hybrid Approach to Enterprise Data Refresh
  • One Database, Two Models: Building AI-Friendly Java Applications With MySQL JSON Duality Views
  • Introducing senro: A Pipeline Engine You Program in Go
  • Kubernetes Rolling Updates Are Lying to You — and Your Users Are Paying for It

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Languages
  4. Feature Comparison of Java Job Schedulers – Plus One

Feature Comparison of Java Job Schedulers – Plus One

By 
Rob Gordon
·
Updated Oct. 11, 22 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
11.7K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Poor Oddjob, I thought as I read Craig Flichel’s Feature Comparison of Java Job Schedulers featuring Obsidian, Quartz, Cron4j and Spring. Yet again it hasn’t made the grade, it’s been passed over for the scheduling team.

Never mind I say, you’re just a little bit different and misunderstood. Let’s have a kick about in the back yard and see what you can do…

Real-time Schedule Changes / Real-time Job Configuration

Oddjob: Yes

Here is Oddjob’s Client GUI, connecting to an instance of Oddjob running as a Windows Service on my home PC.

My Oddjob InstanceMy Oddob instance sends me a reminder email when it’s someone’s birthday, and also tells me when it’s going to rain. The swing UI allows complete configuration of the server. With it I can configure the jobs and their schedules, but unfortunately I can’t control the weather!

Ad-hoc Job Submission: Yes
Configurable Job Conflicts: Not Really Applicable

Ad-hoc job submission is really what Oddjob is all about. Many jobs won’t be scheduled at all and will sit in a folder to be manually run as required. To run a job, scheduled or not, just click ‘run’ from the job menu.

Job conflicts aren’t really a problem for Oddjob because it won’t reschedule a job again until it’s finished. If a job’s next slot has passed, you have the choice to run immediately or skip missed runs and reschedule from the current time. If you want concurrent execution you can configure different jobs to run at the same time or use a single schedule and launch the jobs in parallel.

Manually Stopping a job is just as easy as running it. Click ‘stop’ from the job menu.

Code- and XML-Free Job Configuration

Oddjob: Yes

You saw this in the first section. Oddjob’s configuration is via a UI and is done in real time. In fact I often start one job as I’m configuring the next. It’s all very interactive.

Oddjob uses XML behind the scenes for those that like to see under the hood.

Job Event Subscription/Notification

Oddjob: Yes

It’s very easy to trigger a job based on the completion state of another job. You would have to write code to listen to configuration changes though.

Custom Listeners: Undocumented
Job Chaining: Yes

There’s lots of options for job chaining, sequential, parallel, or cascade, and any nested combinations thereof.

Adding a custom Stateful listener would be easy enough, and might be useful if embedding Oddjob but this isn’t the normal use case. The unit tests do this extensively however.

Monitoring & Management UI

Oddjob: Yes

The same UI allows you to see the job state, job by job log messages, the console of an Exec Job, and the run time properties of all the jobs.

Zero Configuration Clustering and Load Sharing

Oddjob: Kind Of

Oddjob has a Grab Job so you can run the same configuration on several servers and have them compete for work. I wrote it as a proof of concept but I’ve never had cause to use it in the field and I haven’t had any reports that others have either.

Job Execution Host Affinity: Kind Of

In the same way that you add the ‘Grab job’ to many servers to share work, you could in theory just add Grab for a particular job to only certain servers. I guess this is server Affinity?

Scripting Language Support in Jobs

Oddjob: Yes

Oddjob has a Script Job for any language that supports the Java Scripting Framework. JavaScript is shipped by default.With the Script Job you can also interact with Oddjob to use the properties of other jobs, and set variables for other jobs to use.

Scheduling Precision

Oddjob: Millisecond

In theory Oddjob can schedule with millisecond precision, but this isn’t usual practice. Polling for a file every 30 seconds, for instance, is normally fine.

Job Scheduling & Management REST API

Oddjob: JMX Only

No REST API. You can embed the JMX Client easily enough and control everything from Java, but not for other languages. Not yet.

Custom Calendar Support

Oddjob: Yes

Oddjob has the concept of breaking a schedule with another. The breaks can be as flexible as the job schedule itself – define days, weeks or just a few hours off for a task. The Scheduling section of the User Guide has much more on Oddjob’s flexible scheduling capabilities.

Conclusion

Oddjob has many other features to make automating repetitive tasks easy. One noteworthy feature is the ease of adding custom jobs by just implementing java.lang.Runnable.

Oddjob is undeniably an amateur player in the Scheduler league, and one that is often overlooked. With its Apache licence it is completely free and open. Why not check it out when you have an hour or two? You might be pleasantly surprised by the quality of play.

career job scheduling Java (programming language) Comparison (grammar) Plus (programming language)

Published at DZone with permission of Rob Gordon. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Modernizing Apache Spark Applications With GenAI: Migrating From Java to Scala
  • Part 3 of My OCP Journey: Practical Tips and Examples
  • Fun Is the Glue That Makes Everything Stick, Also the OCP
  • Does the OCP Exam Still Make Sense?

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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