스케쥴러 실행시간 조정
@79ad8b0a4c2db3af2526a3746391a683bb22b08b
--- src/main/java/itn/let/schdlr/service/SchedulerUtil.java
+++ src/main/java/itn/let/schdlr/service/SchedulerUtil.java
... | ... | @@ -271,113 +271,90 @@ |
| 271 | 271 |
} |
| 272 | 272 |
|
| 273 | 273 |
// AGENT별 SMS LMS MMS 발송건수 , 카카오 알림톡 발송건수 통계 스케쥴러 |
| 274 |
-// @Scheduled(cron = "0 */10 * * * *") //10분마다 실행(TEST) |
|
| 275 | 274 |
@Scheduled(cron = "0 10 1 * * *") // 매일 새벽1시 10분 실행 |
| 276 |
-// @Scheduled(cron = "0 */30 * * * *") // 30분마다 실행 |
|
| 277 | 275 |
@SchedulerLock(name = "insertAgentSmsCountStat", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
| 278 | 276 |
public void agentSmsCountStatInsert() throws Exception {
|
| 279 |
- // agent별 sms lms mms 발송건수 통계 데이터 upsert |
|
| 280 |
- |
|
| 281 |
- //System.out.println("insertAgentSmsCountStat scheduler RUN (YESTERDAY)");
|
|
| 282 |
- |
|
| 283 |
-// int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
|
| 284 |
- //int minusDate =EgovDateUtil.dayMinusToInt("yyyyMMdd", 1);
|
|
| 285 |
- // 전일 문자발송 건 통계 insert |
|
| 286 |
- //MjonMsgStatVO mjonMsgStatVO = new MjonMsgStatVO(); |
|
| 287 |
- //mjonMsgStatVO.setStatStartDate(minusDate); |
|
| 288 |
- //mjonMsgStatVO.setStatEndDate(minusDate); |
|
| 289 |
- |
|
| 290 |
- //mjonMsgService.insertAgentSmsCountStat(mjonMsgStatVO); |
|
| 291 |
- |
|
| 292 |
- |
|
| 293 | 277 |
try {
|
| 294 |
- |
|
| 295 |
- |
|
| 296 | 278 |
System.out.println("=============EgovSysLogScheduling=====insertAgentSmsCountStat scheduler RUN (YESTERDAY) =============>");
|
| 297 |
- |
|
| 298 |
-// int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
|
| 299 | 279 |
int minusDate =EgovDateUtil.dayMinusToInt("yyyyMMdd", 1);
|
| 300 | 280 |
int minusSevenDays =EgovDateUtil.dayMinusToInt("yyyyMMdd", 7);
|
| 281 |
+ |
|
| 282 |
+ // 전일 문자발송 건 통계 insert |
|
| 301 | 283 |
MjonMsgStatVO mjonMsgStatVO = new MjonMsgStatVO(); |
| 302 | 284 |
mjonMsgStatVO.setStatStartDate(minusSevenDays); |
| 303 | 285 |
mjonMsgStatVO.setStatEndDate(minusDate); |
| 304 |
- |
|
| 305 |
- // 전일 문자발송 건 통계 insert |
|
| 306 | 286 |
mjonMsgService.insertAgentSmsCountStat(mjonMsgStatVO); |
| 307 |
- //================================================================ |
|
| 308 |
- //================================================================ |
|
| 287 |
+ |
|
| 288 |
+ // 전일 알림톡발송 건 통계 insert |
|
| 309 | 289 |
MjonKakaoAtStatVO kakaoAtStatVO = new MjonKakaoAtStatVO(); |
| 310 | 290 |
kakaoAtStatVO.setStatStartDate(minusSevenDays); |
| 311 | 291 |
kakaoAtStatVO.setStatEndDate(minusDate); |
| 312 |
- |
|
| 313 |
- // 전일 알림톡발송 건 통계 insert |
|
| 314 | 292 |
kakaoStatisticsService.insertKakaoAtCountStat(kakaoAtStatVO); |
| 315 |
- //================================================================ |
|
| 316 |
- //================================================================ |
|
| 293 |
+ |
|
| 294 |
+ // 전일 알림톡발송 건 통계 insert |
|
| 317 | 295 |
FaxStatVO faxStatVO = new FaxStatVO(); |
| 318 | 296 |
faxStatVO.setStatStartDate(minusSevenDays); |
| 319 | 297 |
faxStatVO.setStatEndDate(minusDate); |
| 320 |
- |
|
| 321 |
- // 전일 알림톡발송 건 통계 insert |
|
| 322 | 298 |
faxAdmService.insertFaxCountStat(faxStatVO); |
| 323 |
- |
|
| 324 |
- |
|
| 325 |
- // do something... |
|
| 326 | 299 |
|
| 327 | 300 |
}catch(Exception ex) {
|
| 328 | 301 |
ex.printStackTrace(); |
| 329 | 302 |
} |
| 330 | 303 |
} |
| 331 | 304 |
|
| 332 |
- // AGENT별 SMS LMS MMS 발송건수 통계 스케쥴러 |
|
| 333 |
-// @Scheduled(cron = "0 */10 * * * *") //10분마다 실행(TEST) |
|
| 334 |
-// @Scheduled(cron = "0 0 1 * * *") // 매일 새벽1시 실행 |
|
| 335 |
- @Scheduled(cron = "0 */30 * * * *") // 30분마다 실행 |
|
| 336 |
- @SchedulerLock(name = "insertAgentSmsCountStat", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
|
| 337 |
- public void agentSmsCountStatInsert2() throws Exception {
|
|
| 338 |
- // agent별 sms lms mms 발송건수 통계 데이터 upsert |
|
| 339 |
- |
|
| 340 |
- //System.out.println("insertAgentSmsCountStat scheduler RUN (EVERY 30 MINUTES)");
|
|
| 341 |
- |
|
| 342 |
- //int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
|
| 343 |
-// int minusDate =EgovDateUtil.dayMinusToInt("yyyyMMdd", 1);
|
|
| 344 |
- // 당일 문자발송 건 통계 insert |
|
| 345 |
- //MjonMsgStatVO mjonMsgStatVO = new MjonMsgStatVO(); |
|
| 346 |
- //mjonMsgStatVO.setStatStartDate(nowDate); |
|
| 347 |
- //mjonMsgStatVO.setStatEndDate(nowDate); |
|
| 348 |
- |
|
| 349 |
- //mjonMsgService.insertAgentSmsCountStat(mjonMsgStatVO); |
|
| 350 |
- |
|
| 351 |
- |
|
| 305 |
+ // AGENT별 SMS 발송건수 통계 스케쥴러 |
|
| 306 |
+ @Scheduled(cron = "0 5,35 * * * *") // 5,35분마다 실행 |
|
| 307 |
+ @SchedulerLock(name = "insertAgentSmsCountStatByMinute", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
|
| 308 |
+ public void agentSmsCountStatByMinuteInsert() throws Exception {
|
|
| 352 | 309 |
try {
|
| 353 |
- System.out.println("=============EgovSysLogScheduling=====agentSmsCountStatInsert2 =============>");
|
|
| 310 |
+ System.out.println("=============EgovSysLogScheduling=====insertAgentSmsCountStatByMinute =============>");
|
|
| 354 | 311 |
|
| 355 | 312 |
int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
| 356 |
-// int minusDate =EgovDateUtil.dayMinusToInt("yyyyMMdd", 1);
|
|
| 313 |
+ |
|
| 357 | 314 |
// 당일 문자발송 건 통계 insert |
| 358 | 315 |
MjonMsgStatVO mjonMsgStatVO = new MjonMsgStatVO(); |
| 359 | 316 |
mjonMsgStatVO.setStatStartDate(nowDate); |
| 360 | 317 |
mjonMsgStatVO.setStatEndDate(nowDate); |
| 361 |
- |
|
| 362 | 318 |
mjonMsgService.insertAgentSmsCountStat(mjonMsgStatVO); |
| 363 |
- //================================================================ |
|
| 364 |
- //================================================================ |
|
| 319 |
+ }catch(Exception ex) {
|
|
| 320 |
+ ex.printStackTrace(); |
|
| 321 |
+ } |
|
| 322 |
+ } |
|
| 323 |
+ |
|
| 324 |
+ // AGENT별 Kakao 발송건수 통계 스케쥴러 |
|
| 325 |
+ @Scheduled(cron = "0 10,40 * * * *") // 10,40분마다 실행 |
|
| 326 |
+ @SchedulerLock(name = "insertAgentKakaoCountStatByMinute", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
|
| 327 |
+ public void agentKakaoCountStatByMinuteInsert() throws Exception {
|
|
| 328 |
+ try {
|
|
| 329 |
+ System.out.println("=============EgovSysLogScheduling=====insertAgentKakaoCountStatByMinute =============>");
|
|
| 330 |
+ |
|
| 331 |
+ int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
|
| 332 |
+ |
|
| 333 |
+ // 당일 알림톡발송 건 통계 insert |
|
| 365 | 334 |
MjonKakaoAtStatVO kakaoAtStatVO = new MjonKakaoAtStatVO(); |
| 366 | 335 |
kakaoAtStatVO.setStatStartDate(nowDate); |
| 367 | 336 |
kakaoAtStatVO.setStatEndDate(nowDate); |
| 368 |
- |
|
| 369 |
- // 당일 알림톡발송 건 통계 insert |
|
| 370 | 337 |
kakaoStatisticsService.insertKakaoAtCountStat(kakaoAtStatVO); |
| 371 | 338 |
|
| 372 |
- //================================================================ |
|
| 339 |
+ }catch(Exception ex) {
|
|
| 340 |
+ ex.printStackTrace(); |
|
| 341 |
+ } |
|
| 342 |
+ } |
|
| 343 |
+ |
|
| 344 |
+ // AGENT별 Fax 발송건수 통계 스케쥴러 |
|
| 345 |
+ @Scheduled(cron = "0 15,45 * * * *") // 15,45분마다 실행 |
|
| 346 |
+ @SchedulerLock(name = "insertAgentFaxCountStatByMinute", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
|
| 347 |
+ public void agentFaxCountStatByMinuteInsert() throws Exception {
|
|
| 348 |
+ try {
|
|
| 349 |
+ System.out.println("=============EgovSysLogScheduling=====insertAgentFaxCountStatByMinute =============>");
|
|
| 350 |
+ |
|
| 351 |
+ int nowDate =EgovDateUtil.nowDateToInt("yyyyMMdd");
|
|
| 352 |
+ |
|
| 353 |
+ // 전일 알림톡발송 건 통계 insert |
|
| 373 | 354 |
FaxStatVO faxStatVO = new FaxStatVO(); |
| 374 | 355 |
faxStatVO.setStatStartDate(nowDate); |
| 375 | 356 |
faxStatVO.setStatEndDate(nowDate); |
| 376 |
- |
|
| 377 |
- // 전일 알림톡발송 건 통계 insert |
|
| 378 | 357 |
faxAdmService.insertFaxCountStat(faxStatVO); |
| 379 |
- |
|
| 380 |
- // do something... |
|
| 381 | 358 |
|
| 382 | 359 |
}catch(Exception ex) {
|
| 383 | 360 |
ex.printStackTrace(); |
... | ... | @@ -428,9 +405,9 @@ |
| 428 | 405 |
} |
| 429 | 406 |
|
| 430 | 407 |
// 대시보드 어제/오늘 접속현황 & 접속통계 |
| 431 |
- @Scheduled(cron = "0 */30 * * * *") // 30분마다 실행 |
|
| 408 |
+ @Scheduled(cron = "0 20,50 * * * *") // 20,50분마다 실행 |
|
| 432 | 409 |
@SchedulerLock(name = "updateDashBoardStat", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
| 433 |
- public void DashBoardStatUpdate() throws Exception {
|
|
| 410 |
+ public void dashBoardStatUpdate() throws Exception {
|
|
| 434 | 411 |
|
| 435 | 412 |
try {
|
| 436 | 413 |
System.out.println("=============EgovSysLogScheduling=====DashBoardStatUpdate =============>");
|
... | ... | @@ -455,7 +432,7 @@ |
| 455 | 432 |
} |
| 456 | 433 |
|
| 457 | 434 |
// 이용약관 메일발송 |
| 458 |
- @Scheduled(cron = "0 */10 * * * *") // 10분마다 실행 |
|
| 435 |
+ @Scheduled(cron = "0 */15 * * * *") // 15분마다 실행 |
|
| 459 | 436 |
@SchedulerLock(name = "sendTermsEmail", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
| 460 | 437 |
public void TermsEmailSend() throws Exception {
|
| 461 | 438 |
|
... | ... | @@ -474,7 +451,7 @@ |
| 474 | 451 |
return new JdbcTemplateLockProvider(dataSource); |
| 475 | 452 |
} |
| 476 | 453 |
|
| 477 |
- @Scheduled(cron = "20 * * * * ?") |
|
| 454 |
+ @Scheduled(cron = "0 0/3 * * * ?") // 3분마다 실행 |
|
| 478 | 455 |
@SchedulerLock(name = "runKakaoOneTime", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
| 479 | 456 |
public void runKakaoOneTime() throws Exception {
|
| 480 | 457 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?