Timers

TwitterFacebook
Get flash to fully experience Pearltrees
http://www.javapractices.com/topic/TopicAction.do?Id=54 Tasks can be scheduled for execution in the future. Such tasks can be performed either periodically, or just once. As well, the first execution can be delayed to a specific time in the future.

Use Timer to schedule periodic tasks

The java.util.Timer and java.util.TimerTask classes, which I'll refer to collectively as the Java timer framework , make it easy for programmers to schedule simple tasks. (Note that these classes are also available in J2ME.)

Scheduling recurring tasks in Java applications

http://www.ibm.com/developerworks/java/library/j-schedule/index.html
http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml

Scheduling a Timer Task,Java Task Scheduler,Java Schedule Task Example

In this section, you can learn how to schedule a timer task to run at a certain time and repeatedly.

Schedule events with the Timer class

The TechRepublic CIO50 list celebrates the most influential and innovative tech chiefs, voted by their fellow CIOs http://www.techrepublic.com/article/schedule-events-with-the-timer-class/1046081
JDK Timer is a simple scheduler for a specified task for repeated fixed-delay execution. To use this, you have to extends the TimerTask abstract class, override the run() method with your scheduler function. RunMeTask.java http://www.mkyong.com/java/jdk-timer-scheduler-example/

JDK Timer scheduler example

import java.util.Timer ; import java.util.TimerTask ; /** * * This class uses the java.util.Timer functionality * The class will repeat itself every second. * * @author Toy */ http://www.noppanit.com/how-to-use-java-util-timer-to-repeat-the-task/

Programming Blog » Blog Archive » How to use java.util.Timer to repeat the task