Thursday, May 21, 2009

Spring scheduling provides the easy configurable way for Cron jobs/ Schdulers.

1. myJobClass refers to the bean which refers to myJobClass.java (Actual job to be scheduled). UserDAO is injected to the MyJobClass. Spring scheduling is so far not in the picture i.e. loosely coupling

2. myBeanJobDetail is the bean which actually calls spring scheduling API. You need to set properties which are again Injected to spring beans on runtime.

3.Cron Trigger is the bean where you actually make your job a full blown trigger by setting up the triggering time.






Though this is a simple way of doing things but we can independently use Quartz API for scheduling. I will refer to that approach in my next blog.