what is the best way to run function each 10 minutes directly in hh:m5 (00:05,00:15,00:25,...,23:55). Is it reliable to use scheduler which starts at 00:05 and have period of 10 minutes? I mean something like
Date date0005 = new java.util.Date();
date0005.setHour(00);
date0005.setMinutes(05);
// instead of this here can be function to found nearest hh:m5 from run
Timer timer = new Timer();
timer.sc(myOwnTimerTask,date0005, 600000);
Will it works after for example 1 month of continuous run? I mean, will function be called for example still at hh:m5 and not at hh:m6?
Or is better to do function, which runs every 31-60 seconds, which can control last digit of hh:mm and if there is 5, then it calls the function?
Or is there any better way?