一基的服务与模板重新建立一个环境

This commit is contained in:
daihh
2022-10-15 11:54:53 +08:00
commit e8cb8ff892
1902 changed files with 111094 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package com.xboe.casetask;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
/**
* 案例数据同步处理
*/
@Slf4j
@EnableScheduling
@Component("com.xboe.casetask.CaseDataTimeSchedule")
public class CaseDataTimeSchedule{
@Resource
CaseDataSyncRunner runner;
/**每隔12个小时执行一次*/
@Scheduled(cron="0 0 12,22 * * ?")
public void execute() {
try {
runner.run();
} catch (Exception e) {
log.error("同步案例数据错误",e);
}
}
}