Spring Timer's are great if you need a job or task to run on a fixed interval. For example, if you need a bean to wake up and run itself every 30-minutes. But what if you need finer control over the scheduling of a timer? Say you need a job to run every morning at 3AM, regardless of when the JVM is started. Or, say you need a bean to run "every half hour between the hours of 8 AM and 10 AM on the 5th and 20th of every month." You won't get that type of granular control with a straight-up Spring Timer.
Meet Quartz, a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application. Similar to a native UNIX Cron job, Quartz lets you define powerful CronExpression's that give you very precise control over when a job or task is started and on what interval.
Setting up Quartz with your Spring powered web-application is easy.
Meet Quartz, a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application. Similar to a native UNIX Cron job, Quartz lets you define powerful CronExpression's that give you very precise control over when a job or task is started and on what interval.
Setting up Quartz with your Spring powered web-application is easy.
Continue reading HOWTO: Scheduling Cron Style Timers and Jobs with Spring and Quartz.

