java任务调度工具cron4j简介
基于LGPL发布的cron4j实现了用Unix crontab语法来调度任务,使用方法如下:
// Creates a Scheduler instance. 创建调度实例 Scheduler s = new Scheduler(); // Schedule a once-a-minute task. 分配任务调度,1分钟执行一次 s.schedule("* * * * *", new Runnable() { public void run() { System.out.println("Another minute ticked away..."); } }); // Starts the scheduler. 开始调度 s.start(); |
cron4j很轻量级,如果要实现更强大的一些功能,如与spring配置结合等,推荐使用quartz更方便。
原创文章如转载,请注明:转载自CODIGG [ http://www.codigg.com/ ]
本文链接地址:http://www.codigg.com/2009/05/java-scheduler-cron4j/


一月 18th, 2012 at 15:00
I want to use some of the content on my blog. Naturally I’ll offer you a hyperlink on my internet blog. Thanks for sharing.
[回复]
一月 25th, 2012 at 06:52
˙ţC
[回复]
二月 2nd, 2012 at 17:01
Might I just simply say, what an ease to see people whom truly knows about exactly what theyre preaching about on the web. You unquestionably know the best way to deliver a predicament to light and causes it to be very important. A lot more folks need to take a look at this as well as comprehend this valuable half of the story. I simply cannot believe that youre not even more popular considering that you definitely have the Expertise.
[回复]
二月 3rd, 2012 at 11:40
I needed for this web site submit admin genuinely thanks i will seem your next sharings i bookmarked your blog
[回复]
二月 4th, 2012 at 06:04
It is hard to come by informed individuals for this matter, however, you sound like you know just what you are referring to! Cheers
[回复]
二月 4th, 2012 at 10:34
I was curious about your next put up admin actually essential this weblog super wonderful website
[回复]
二月 4th, 2012 at 15:05
Fantastic submit admin! i bookmarked your world-wide-web web site. i’ll glance ahead in the event you may have an e-mail variety adding.
[回复]
二月 5th, 2012 at 06:31
Nice a single blog operator success webpage article fantastic sharings within this website generally have pleasurable
[回复]