| | |
| | | * 文件默认保存小时数,0不限制 |
| | | */ |
| | | private static final int DEFAULT_HOUR = 0; |
| | | // 每5秒执行一次 |
| | | //@Scheduled(fixedRate = 1000000) |
| | | //@Scheduled(cron = "0 1 0 * * ?") // 每天上午0点1分执行 |
| | | //@Scheduled(cron = "0 */3 * * * ?") |
| | | //@Scheduled(cron = "0 15 19 * * ?") //test |
| | | //@Scheduled(cron = "${task.cron.machine_file_scan}") |
| | | |
| | | @Scheduled(cron = "${task.cron.machine_rec_move:0 3 * * * ?}") |
| | | public void execute() { |
| | | String networkType = paramService.getParamValue(ParamService.NETWORK_TYPE,ParamService.NETWORK_TYPE_SHEMI); |
| | |
| | | LocalDateTime earlyTime = now.minusHours(remainHours); |
| | | List<MachineFile> overTimeFiles = this.machineFileService.lambdaQuery().lt(MachineFile::getFileCreateTime,earlyTime) |
| | | .eq(MachineFile::getDirType,MachineFile.DIR_TYPE_REC) |
| | | .eq(MachineFile::getExceptionType,MachineFile.EXCEPTION_OK) |
| | | .eq(MachineFile::getMachineCode,machine.getCode()).list(); |
| | | |
| | | for(MachineFile overTimeFile : overTimeFiles){ |