Java任務調度開源框架quartz學習


一、quartz學習

Java框架介紹:Quartz從入門到進階

http://edu.yesky.com/edupxpt/233/2209233.shtml

 

1、例子:http://javacrazyer.iteye.com/blog/675460

http://blog.csdn.net/lotusyangjun/article/details/6450421

http://blog.csdn.net/lnara/article/details/8632324

2、官網:http://www.quartz-scheduler.org

3、和Spring一起使用

http://kevin19900306.iteye.com/blog/1397744

http://www.oschina.net/question/565065_86534

http://www.blogjava.net/zwzw-love/archive/2010/11/16/338182.html

如何將Spring管理的bean注入到job中:http://www.tuicool.com/articles/Qjyamu

4、使用經驗:CronTrigger的startTime和endTime指的是表達式的生效開始時間和結束時間,而不是job的執行時間。

CronTrigger在setCronExpression()以后有個問題,就是如果表達式中定義的執行時間比當前服務器時間提前不到3個小時的時候,在執行了

scheduler.reSchedulerJob以后會馬上執行,解決這個問題的方法就是在setCronExpression()以后做trigger.setStartTime(new Date())

5、dbcp的spring配置:http://www.360doc.com/content/14/0310/14/16148329_359270520.shtml

二、ScheduledThreadPoolExecutor學習

JDK5以后 Java引入了ScheduledThreadPoolExecutor,理論上已經不需要再用timer了

1、Timer和ScheduledThreadPoolExecutor的區別http://blog.csdn.net/masterseventeen/article/details/3443114

2、使用ScheduledThreadPoolExecutor代替Timer&TimerTask:http://web.cutt.com/article/1686596369

http://dongxuan.iteye.com/blog/901689


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM