简体   繁体   中英

job scheduling with java and spring 3

Hi I have one requirement to schedule task using java. I can use threads and timer task of java but if we restart application or server that threads will get stop and after starting application there is no schedule task. so please help me is there any way for that i am using java with spring 3.1

Spring batch is the solution for your case. you can find documentation here , documentation is pretty good with sample programs which are extensively used. It has the feature to restart the job.

You could try with quartz-scheduler , Its easy to use with spring.

For your reference : http://www.mkyong.com/tutorials/quartz-scheduler-tutorial/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM