嗨,我正在尝试编写课程以在特定时间安排工作。这是代码,
public void test(){
Timer timer = new Timer();
Calendar date = Calendar.getInstance();
date.set(Calendar.HOUR,0);
date.set(Calendar.MINUTE, 0);
date.set(Calendar.SECOND, 2);
date.set(Calendar.MILLISECOND,0);
//schedule to run on 1 am every friday.
timer.schedule(new JobRunner(), date.getTime(),1*0*0*0);
}
请在最后一行提供帮助,我不确定如何在其中指定时间。
谢谢