
6 changed files with 123 additions and 9 deletions
@ -0,0 +1,63 @@ |
|||
package com.yxt.supervise.monitor.biz.scheduled; |
|||
|
|||
import org.springframework.scheduling.annotation.Async; |
|||
import org.springframework.scheduling.annotation.Scheduled; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
@Service |
|||
public class SyncService { |
|||
|
|||
// @Scheduled(fixedDelay = 1000 * 60 * 120) //间隔120分钟执行一次
|
|||
// public void pushPersonHospital() {
|
|||
// try {
|
|||
// System.out.println("推送老人出入院记录和评估照片");
|
|||
// iCityPlatformService.pushPersonHospital();
|
|||
// } catch (Exception ex) {
|
|||
// log.error("推送老人出入院记录和评估照片出错:" + ex);
|
|||
// }
|
|||
// }
|
|||
//
|
|||
//
|
|||
// /**
|
|||
// * 删除三个月前的日志 (每月1号执行一次)
|
|||
// */
|
|||
// @Async
|
|||
// @Scheduled(cron = "0 0 0 1 * ?")
|
|||
// public void removeLog() {
|
|||
// try {
|
|||
// System.out.println("删除三个月前的日志");
|
|||
// iCityPlatformService.removeLog();
|
|||
// } catch (Exception ex) {
|
|||
// log.error("删除三个月前的日志出错:" + ex);
|
|||
// }
|
|||
// }
|
|||
//
|
|||
|
|||
@Async |
|||
@Scheduled(fixedDelay = 1000 * 20 * 1) //间隔20秒一次
|
|||
// @Scheduled(cron = "0 10 9 * * ?")
|
|||
public void pushEmail() { |
|||
try { |
|||
System.out.println(1111); |
|||
} catch (Exception ex) { |
|||
ex.printStackTrace(); |
|||
} |
|||
} |
|||
|
|||
|
|||
// @Async
|
|||
// @Scheduled(fixedDelay = 1000 * 60 * 1) //间隔1分钟执行一次
|
|||
//// @Scheduled(cron = "0 10 9 * * ?")
|
|||
// public void tempPush() {
|
|||
// try {
|
|||
// iCityPlatformService.pushEmail();
|
|||
// } catch (Exception ex) {
|
|||
// log.error("临时同步" + ex);
|
|||
// ex.printStackTrace();
|
|||
// }
|
|||
// }
|
|||
|
|||
|
|||
} |
Loading…
Reference in new issue