How do I execute code in an interval?
I have a little taskbar applet that is supposed to check what tasks are close to a deadline every so often (depending on the settings). On my computer it does, but very randomly, on other computers it doesn't even execute. I thought I had it working but it appears I was wrong. This is what I'm doing:
// Deadline Warning Task Warning Timer
deadline_timer.schedule(new TimerTask(){
publicvoid run(){
OverWarn();
}
privatevoid OverWarn(){
if(current_state =="warning"){
trayIcon.displayMessage("You have a task nearing its deadline","You have at least one task that is within "+ConfigurationManager.ReadConfiguration("deadline_threshold")+" hours of when it needs to be completed. Click on this icon to see all assigned tasks.", TrayIcon.MessageType.WARNING);
}
}
}
, Integer.parseInt(ConfigurationManager.ReadConfiguration("deadline_frequency"))*100000, Integer.parseInt(ConfigurationManager.ReadConfiguration("deadline_frequency"))*100000);
Can someone help me to simply run execute some code every couple of minutes (or at least how many minutes the user decides).
Thanks much in advance.

