I want to know the best method to schedule a code. I have a code that generates reports and sends mail to a set of people at interval of 24hrs. Its a console based java appl
Well, if the program can be idle try something like this
try { for (;;) { //code Thread.sleep(1000 * 60 * 60 * 24); //code } } catch(Exception e) { System.out.println(e); }