package com.zy.asrs.task;
|
|
import com.zy.asrs.task.core.ReturnT;
|
import com.zy.asrs.task.handler.TaskHandler;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
|
/**
|
* Created by Monkey D. Luffy on 2023.07.25
|
* 徐工汉云..............以下.............上饶江铜.............拆垛信息上传
|
*/
|
@Slf4j
|
@Component
|
public class TaskScheduler {
|
|
@Autowired
|
private TaskHandler taskHandler;
|
|
@Scheduled(cron = "0/1 * * * * ? ")
|
private void execute(){
|
try{
|
ReturnT<String> result = taskHandler.start();
|
}catch (Exception e){
|
log.error("异常信息:"+e);
|
}
|
}
|
}
|