任务调度框架 cron4j

jopen 13年前
     <p>cron4j 是一个Java的任务调度框架,类似于UNIX系统下的crontab.</p>    <p>使用示例:</p>    <pre class="brush:java; toolbar: true; auto-links: false;">import it.sauronsoftware.cron4j.Scheduler;  public class TestScheduler {  public static void main(String[] args) throws Throwable {   Scheduler scheduler = new Scheduler();   scheduler.schedule("* * * * *", new HelloWorldTask());   scheduler.start();   Thread.sleep(300000); // pause the main thread for 5 minutes   scheduler.stop();  } }</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324800389249" target="_blank">http://www.open-open.com/lib/view/home/1324800389249</a></p>    <p></p>