Java Job Scheduling
This entry was posted on May 11 2009
In my continued efforts to provide an opinionated view on Java architecture, I’m going to talk about scheduling frameworks and to that end, I’m only going to talk about one.
Quartz
Quartz is really the only framework that is widely supported in Java:
- It has great Spring support, outlined at http://static.springframework.org/spring/docs/2.5.x/reference/scheduling.html. This is definitely the best way to use Quartz in most cases.
- Quartz can be run programatically, but you have to write a tiny bit of code to do it. There is a quick start guide on the quartz site - basically, you need a properties file and a main class, so not that bad. Still a little harder than the spring way, so not desirable.
- It is very easy to run Quartz as a servlet - the documentation is actually contained in the Javadoc. It’s similar to the programatic method in that you need to write a properties file, but you don’t have to write a main method, and that’s a good thing.
Quartz is solid, use it if you need scheduled tasks. The Canuck’s just scored, and I’m going to watch the game now.
