Have one Timer Componet like this. load this componet in
Servlet init method
*****************************************
import java.util.*;
import java.io.*;
public class SchedulerComponent
{
Date DateObj =new Date();
//load this text file value and set for date obj.
SchedulerComponent()
{
Timer objTimer = new Timer();
objTimer.scheduleAtFixedRate(new TimerTask()
{public void run()
{
for (int i = 0 ; i < 100 ; i++)
{
System.out.println(i);
}
//iCount1++;
}
}, 0, DateObj);
}
}
********************************************
I think this works for you..
Viswanatha GB
http://viswa.itgo.com INDIA
Originally posted by vivek sivakumar:
i have a java program which does a simple for loop
like this
class time{
public static void main(String args[])
{
for (int i = 0 ; i < 100 ; i++)
{
System.out.println(i);
}
}
}
but what i want to do is that i have a file (for ex value.txt)where i want to say something like this
[12.05.2002]
9:00
the day and time when this (above program) has to start ... how can i do it ???
any snippet will be helpful ...thanks in advance for ur support.