如果我使用以下代码,该程序将无效。 ' Hour_Of_Day'格式错了。为什么呢?
try {
Calendar today = Calendar.getInstance();
today.set(Calendar.HOUR_OF_DAY, 2);
today.set(Calendar.MINUTE, 0);
today.set(Calendar.SECOND, 0);
Timer timer = new Timer();
// Schedule to run every Sunday in midnight
timer.schedule(new StarteProzesse(), today.getTime(), TimeUnit.MILLISECONDS.convert(1, TimeUnit.DAYS));
} catch (Exception e) {
e.printStackTrace();
}