| | |
| | | private ParamService paramService; |
| | | @Autowired |
| | | private ReceiveFileCheckService receiveFileCheckService; |
| | | /** |
| | | * 文件默认保存小时数,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_check:0 */10 * * * ?}") |
| | | @Scheduled(cron = "${task.cron.machine_rec_check:0 */11 * * * ?}") |
| | | public void execute() { |
| | | String networkType = paramService.getParamValue(ParamService.NETWORK_TYPE,ParamService.NETWORK_TYPE_SHEMI); |
| | | |
| | | if(!ParamService.NETWORK_TYPE_SHEMI.equals(networkType)){ |
| | | //非涉密网,才扫描目录文件 |
| | | log.info("reccheckfile start"); |
| | | checkFiles(); |
| | | |
| | | log.info("reccheckfile end"); |
| | | } |
| | | |
| | | } |