Re: How to run a Java Program on a timely basis ?
Posted By:
Kailash_Vasani
Posted On:
Friday, March 23, 2001 06:29 AM
What I'm going to propose is not a java
based solution, it is NT based solution.
First, go to control panel. If u see Add Scheduled task icon, u can use the following technique.
Assuming that target NT machine is capable of running scheduled task ( not all are capable), all you need to do is to create a batch or command ( .bat or .cmd file), with full java commandline(including -classpath option) which u need to run. Then use add scheduled task wizard to create a new schedule task that will run the .bat(or .cmd) file u created above. The task can be configured after creation also.
Else the other way out is to create a batch(or command) file that is scripted to use NT's commands & will keep on checking time at regular interval. After the time specified has elapsed, it will invoke the java command.
u need a good scripting knowledge for this.