I’ve got to write an app that performs a series of tasks:
- task to be run once at 0200 hours every day.
- task to be run once at 0400 hours ever day
- task to be run at 15 minute intervals starting at 0003 hours
- task to be run at 15 minute intervals starting at 0005 hours
What are the pros and cons of using plain java.util.timer Vs. Quartz for this?
Are there any other alternatives I should be considering?
Quartz
Timer
I am personally using Quartz + persistent storage for a Web application where triggers can be created interactively and should survive restarts, using Spring’s scheduling abstraction. Both APIs IMHO lack an important concept: retrying failed tasks after a certain period of time. Adding this for myself was a pain for repeated tasks that should be retried as well.