springboot-quartz-mongodb icon indicating copy to clipboard operation
springboot-quartz-mongodb copied to clipboard

Sample Spring Boot application using Quartz scheduler with MongoDB for persisting job state.

Build Status

spring-boot-quartz-mongodb

Sample Spring Boot application using Quartz scheduler with MongoDB for persisting job state.

Inspired by work on this topic from Arvind Rai and David Kiss.

Alternative approach by Mark Taylor using Spring Bean XML configuration files.

Development & Debugging

To start the application (with embedded Jetty) in debug mode, just call:

./gradlew bootRun --debug-jvm

Per default JDWP is listening on port 5005 per dt_socket transport.

MongoDB maintenance

For cleaning up job and trigger definition, execute:

mongo jobs-demo < cleanup-jobs.js

TODO

  • Allow integration testing by making use of Fongo, see Issue 77 for inspiration
  • Use Jongo to make Mongo database access more elegant (instead of direct access via MongoDB database driver)
  • Migration in case job or trigger configuration has changed, see mongeez
  • Discuss alternative approach to auto-wiring, but using job data map to transport payload
  • Discuss more advanced Quartz features like failure recovery (misfire), job prioritization, see spring-batch-quartz-example for inspirations