Skip to content

Commit

Permalink
refactor: 메뉴 크롤링 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueBerrySoda committed Jun 2, 2024
1 parent 52c81f7 commit 84cdf08
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ public boolean testKeyCheck(String key){
else throw new BusinessException(TEST_KEY_NOT_VALID);
}

@Scheduled(cron = "0 0 4 * * MON")
@Scheduled(cron = "0 0,7,14,21,28,35,42 4 * * MON")
public void crawlingMenus(){
LocalDate startDay = LocalDate.now();

for(int i=0; i<7; i++){
menuUpdateService.updateMenus(startDay.plusDays(i));
}
int i = LocalDateTime.now().getMinute() / 7;
menuUpdateService.updateMenus(startDay.plusDays(i));
}
}

0 comments on commit 84cdf08

Please sign in to comment.