package com.zy.asrs.task; import com.zy.asrs.task.handler.WrkMastExecuteHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * Created by Monkey D. Luffy on 2024.06.27 * 亳州煜星..............以下.............亳州煜星.............硫化罐区域执行任务 */ @Component public class WrkMastExecuteScheduler { private static final Logger log = LoggerFactory.getLogger(WrkMastExecuteScheduler.class); private static final int[][] execute = new int[][]{{1,5},{2,5},{3,5},{4,5},{5,7},{6,7},{7,5},{8,5},{9,4},{10,5},{11,5}}; @Autowired private WrkMastExecuteHandler wrkMastExecuteHandler; @Autowired @Scheduled(cron = "0/3 * * * * ? ") private void execute(){ for (int[] excuteNow : execute){ try{ wrkMastExecuteHandler.start(excuteNow); } catch (Exception e){ log.error("硫化罐任务转历史档案失败!!!"); } } } }