feat: There is no way the, tree async
This commit is contained in:
+10
-5
@@ -46,7 +46,7 @@ public class StateSync {
|
||||
|
||||
|
||||
// 月初
|
||||
@Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void StandScheduledJobMonthBegin(){
|
||||
@@ -143,8 +143,10 @@ public class StateSync {
|
||||
}
|
||||
}
|
||||
|
||||
// 月初
|
||||
@Scheduled(cron="0 0 1 1 * ?")
|
||||
// 月末
|
||||
@Scheduled(cron="0 0 1 28-31 * ?")
|
||||
// @Scheduled(cron="0 0 1 28-31 * ?")
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void StandScheduledJobMonthEnd(){
|
||||
@@ -154,7 +156,8 @@ public class StateSync {
|
||||
// 判断当前日期是否为月末
|
||||
Date date = new Date();
|
||||
if(isLastDayOfMonth(date)){
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---START-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---START-01");
|
||||
String nextFirst = DateUtil.printDate(DateUtil.nextMonthFirstDate());
|
||||
String nextFin = DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate()));
|
||||
String nextFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())),1);
|
||||
@@ -233,9 +236,11 @@ public class StateSync {
|
||||
bussionessStandStateService.updateBatchById(updList);
|
||||
}
|
||||
}
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---End-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---End-01");
|
||||
}else {
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"当前日期不是最后一日---End-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"当前日期不是最后一日---End-01");
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user