how to schedule a task at specific time?
i have one problem with java scheduler,my actual need is i have to start my process at particular time, and i will stop at certain time ,i can start my process at specific time but i can't stop my process at certain time ,how to specify the process how long to run in scheduler,(here i will not put while ) any one have suggestion for that. import java.util.Timer; import java.util.TimerTask; import java.text.SimpleDateFormat; import java.util.*; public class Timer { public static void main(String[] args) throws Exception { Date timeToRun = new Date(System.currentTimeMillis()); System.out.println