您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
27 行
691 B
27 行
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("我要开始做具体的工作了");
|
|
}
|
|
}
|
|
|