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 Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Languages
  4. Feature Comparison of Java Job Schedulers – Plus One

Feature Comparison of Java Job Schedulers – Plus One

Rob Gordon user avatar by
Rob Gordon
·
Oct. 11, 22 · Interview
Like (1)
Save
Tweet
Share
10.88K Views

Join the DZone community and get the full member experience.

Join For Free

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, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Best CI/CD Tools for DevOps: A Review of the Top 10
  • Master Spring Boot 3 With GraalVM Native Image
  • Specification by Example Is Not a Test Framework
  • Spring Cloud

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: