스케쥴러 추가

This commit is contained in:
hylee 2024-03-22 12:06:56 +09:00
parent cae5a3f471
commit 39a3d37b28
2 changed files with 3 additions and 3 deletions

View File

@ -24,8 +24,8 @@ public class ScheduledTasks {
@Autowired @Autowired
private MorakService morakService; private MorakService morakService;
// @Scheduled(cron = "*/10 * * * * MON-FRI") @Scheduled(cron = "*/10 * * * * MON-FRI")
@Scheduled(cron = "0 40 10 * * MON-FRI") // @Scheduled(cron = "0 40 10 * * MON-FRI")
public void noonJob() throws IOException { public void noonJob() throws IOException {
System.out.println("It's noon!"); System.out.println("It's noon!");
morakService.morakMenu(); morakService.morakMenu();

View File

@ -54,7 +54,7 @@ public class MorakServiceImpl implements MorakService {
// true면 오늘 날짜가 맞음 // true면 오늘 날짜가 맞음
System.out.println(" befor this.dateComparison(imgUrl) :: "+ this.dateComparison(imgUrl)); System.out.println(" befor this.dateComparison(imgUrl) :: "+ this.dateComparison(imgUrl));
if (this.dateComparison(imgUrl)) { if (this.dateComparison(imgUrl)) {
SlackUtil.sendMorakMenuToSlack(imgUrl); // SlackUtil.sendMorakMenuToSlack(imgUrl);
System.out.println("this.dateComparison(imgUrl) :: "+ this.dateComparison(imgUrl)); System.out.println("this.dateComparison(imgUrl) :: "+ this.dateComparison(imgUrl));
break; break;
} else { } else {