File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/com/somemore/domains/recruitboard/scheduler Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1818public class RecruitBoardStatusUpdateScheduler {
1919
2020 private final RecruitBoardRepository recruitBoardRepository ;
21+ private final static String RECRUIT_BOARD_UPDATE_CRON = "0 0 0 * * ?" ;
2122
2223 @ Retryable (
2324 retryFor = Exception .class ,
2425 maxAttempts = 3 ,
2526 backoff = @ Backoff (delay = 2000 )
2627 )
27- @ Scheduled (cron = "0 0 0 * * ?" )
28+ @ Scheduled (cron = RECRUIT_BOARD_UPDATE_CRON )
2829 public void updateRecruitBoardStatusToClosed () {
2930 log .info ("봉사 시작일에 해당하는 모집글 상태를 CLOSED로 변경하는 작업 시작" );
3031 LocalDateTime today = LocalDate .now ().atStartOfDay ();
@@ -45,7 +46,7 @@ public void updateRecruitBoardStatusToClosed() {
4546 maxAttempts = 3 ,
4647 backoff = @ Backoff (delay = 2000 )
4748 )
48- @ Scheduled (cron = "0 0 0 * * ?" )
49+ @ Scheduled (cron = RECRUIT_BOARD_UPDATE_CRON )
4950 public void updateRecruitBoardStatusToCompleted () {
5051 log .info ("봉사 종료일이 지난 모집글 상태를 COMPLETED로 변경하는 작업 시작" );
5152 LocalDateTime today = LocalDate .now ().atStartOfDay ();
You can’t perform that action at this time.
0 commit comments