SpringBoot 2.1.1.RELEASE 集成quartz
http://www.qchcloud.cn/system/article/show/70
依赖配置:


    
        org.quartz-scheduler
        quartz
    

定时任务:

@Componentbr/>@Configurable
@EnableScheduling
public class WorkJobQuartz {
public long count=0;
private static final Logger log = LoggerFactory.getLogger(WorkJobQuartz.class);
@Scheduled(cron="/5 ")
public void reportByCron(){
log.debug("reportCount:"+count+++"");
}
}