You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
691 B

package com.aiprose.sbquartz.quartz;
import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
* @author yanpeng
* @version 1.0
* @desc 具体实现业务逻辑
* @company 北京中经网软件有限公司
* @date 2020/12/23 16:02
*/
//这两个是在分布式环境中使用的
//@PersistJobDataAfterExecution
//@DisallowConcurrentExecution
@Component
@Slf4j
public class DemoJob implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
log.info("执行时间:{}",new Date());
log.info("我要开始做具体的工作了");
}
}