| | |
| | | @EnableScheduling |
| | | public class MachineFileScanTask { |
| | | @Autowired |
| | | private MachineFileService machineFileService; |
| | | @Autowired |
| | | private MachineService machineService; |
| | | @Autowired |
| | | private ParamService paramService; |
| | | @Autowired |
| | | private ProgramAnnotationService programAnnotationService; |
| | | @Autowired |
| | | private MachineFileScanService machineFileScanService; |
| | | // 每5秒执行一次 |
| | |
| | | //@Scheduled(cron = "0 1 0 * * ?") // 每天上午0点1分执行 |
| | | //@Scheduled(cron = "0 */5 * * * ?") |
| | | //@Scheduled(cron = "0 15 19 * * ?") //test |
| | | @Scheduled(cron = "${task.cron.machine_file_scan:0 1 * * * ?}") |
| | | @Scheduled(cron = "${task.cron.machine_file_scan:0 1 0 * * ?}") |
| | | public void execute() { |
| | | String networkType = paramService.getParamValue(ParamService.NETWORK_TYPE,ParamService.NETWORK_TYPE_SHEMI); |
| | | |