package com.test.quartz;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
public class MyTask implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
// TODO Auto-generated method stub
DateFormat df=new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒");
System.out.println("定时任务"+"在"+df.format(new Date())+"时,开始执行!!!");
}
}
package com.test.quartz;
import java.util.Date;
import org.quartz.DateBuilder;
import org.quartz.JobBuilder;
import org.quartz
版权声明:本文为qq_42168865原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。