job 中断

public void loadKey() { 
Date beginDate = DateFormatUtils. parseDate( "201705010000" , "yyyyMMddHHmm") ;
Date endDate = DateFormatUtils. parseDate( "201805312359" , "yyyyMMddHHmm") ;
 
 
Calendar beginCal = Calendar. getInstance() ;
beginCal.setTime(beginDate) ;
Calendar endCal = Calendar. getInstance() ;
endCal.setTime(endDate) ;
Calendar curCal_fyy = beginCal ;
Calendar curCal_cxm = beginCal ;
int i = 0 ;
while (curCal_fyy.before(endCal)) {
doJob_fyy(curCal_fyy) ;
curCal_fyy.add(Calendar. MINUTE , 1) ;
logger.error( " loadKey ,doJob_fyy:" + i) ;
i++ ;
}
logger.error( " loadKey ,doJob_fyy: 结束 " + i) ; // 执行到这儿的时候就停止不在执行了,原因是什么。
 
int y = 0 ;
while (curCal_cxm.before(endCal)) {
doJob_cxm(curCal_cxm) ;
curCal_cxm.add(Calendar. MINUTE , 1) ;
logger.error( " loadKey ,doJob_cxm:" + y) ;
y++ ;
}
logger.error( " loadKey ,doJob_cxm: 结束 " + y) ;
}

猜你喜欢

转载自sailiann.iteye.com/blog/2421861
job
今日推荐