|
@@ -1,5 +1,6 @@
|
|
|
package com.ebei.screen.common.task;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.ebei.screen.service.EbaSystemService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -24,6 +25,12 @@ public class EbaTask {
|
|
|
*/
|
|
|
@Scheduled(cron = "0 0 */1 * * ?")
|
|
|
public void execute() {
|
|
|
- ebaSystemService.initData();
|
|
|
+ try {
|
|
|
+ log.info("定时开始执行 开始时间:{}", DateUtil.now());
|
|
|
+ ebaSystemService.initData();
|
|
|
+ log.info("定时执行结束 结束时间:{}", DateUtil.now());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.info("定时任务执行出现错误:{}", e);
|
|
|
+ }
|
|
|
}
|
|
|
}
|