JaVA Scheduling a Timer Task to Run Repeatedly

JaVA Scheduling a Timer Task to Run Repeatedly

Postby haretu » Wed Jul 25, 2012 3:23 pm

JAVA Scheduling a Timer Task to Run Repeatedly
Code: Select all
int delay = 5000;   // delay for 5 sec.
int period = 1000;  // repeat every sec.
Timer timer = new Timer();

timer.scheduleAtFixedRate(new TimerTask() {
        public void run() {
            // Task here ...
        }
    }, de
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to JAVA

Who is online

Users browsing this forum: No registered users and 1 guest

cron