Java Cron4J Persistent Task
Currently i'm running a nightly server task which was developed in Java using Cron4J. Now i chose Cron4J over the standard Java.util.Timer because of its persistence running the task even after the server has crashed or shut down.
However i cannot seem to shut the task off completely. I can manage to stop it while it is running, however it starts right back up when the server gets restarted.
Has anyone had any experience using the Cron4J library? I would l开发者_如何学Goike to be able to kill all sleeping tasks if it is possible.
Developing on: Windows 7, Apache Tomcat 7, JDK 6.
Thanks for any help or advice.
Have you called deschedule and that didn't remove the task from the queue? You will have to call it for ALL sleeping tasks, there is no way to say cancel every single sleeping task. If you put all your tasks in a file you can descheduleFile, which may be more efficient.
精彩评论