How to make a quartz job create another job to execute after it? -
i tying implement following algorithm quartz , not sure if can done. first attempt @ using quartz.
- user notification job - job computes monthly report , emails user, expects user id , other parameters used generate customized user report
- there potentially 10,000+ of these reports need generated
monthly job figure needs reports fires
- search database users need sent monthly report
- for each user found create jobdetail compute monthly report , deliver report sender takes care of sending report
- schedule each of jobdetails step 2 execute right after job finishes
what have not been able figure out.
- how make sure monthly job executes in single transaction users need monthly report identified , jobs scheduled notify them
- how schedule job right away execute right after job created them?
i using spring 3.2 quartz 2.1
nice use case quartz usage. can try sheduling new job within job class. can possibly creating new jobdetail , trigger inside execute() method.
Comments
Post a Comment