These days have been engaged in an early warning monitoring daemon, the other is done, the most tangled is that the daily fixed time to execute the problem, the main reason for the tangle is not clear the method of the timer, Timer.schedule (timertask task,long l1,long L2 ), it is clear that the task is executed after the L1 time period and then executed once per L2 time,
But Timer.schedule (timertask task,date l1,long L2), just started not to be too clear, always thought is L1 of the Date control of the daily execution, ignoring the existence of L2, always on the Date on the top of the mess, just started to want to press
Timer.schedule (timertask task,long l1,long L2), the logic to achieve a daily execution, but somehow changed direction, leading to confusion for a long time, and then suddenly found that this timer.schedule ( TimerTask task,date L1,long L2); and Timer.schedule (timertask task,long l1,long L2); it's exactly the same, just different types, are based on the value of L2 to determine the number of runs and frequency, but the former is a fixed time for the first run, and the latter is the number of milliseconds after the first run time, so a small understanding of the error, resulting in my day more time wasted, did a lot of useless! Alas! Be sure to pay attention to this mistake next time! Can't stumble on the same rock for the second time!
Also hope that children's shoes in the study work, must not take a similar detour, too wasted time!
Timer for the Java Timer task