Skip to content

Commit

Permalink
add :: EventScheduler 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed Apr 20, 2024
1 parent e76c811 commit 09ccb48
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mindway.server.v2.domain.event.scheduler;

import com.mindway.server.v2.domain.event.service.ChangeNowToPastService;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;

@RequiredArgsConstructor
public class EventScheduler {

private final ChangeNowToPastService changeNowToPastService;

@Scheduled(cron = "0 0 0 * *", zone = "Asia/Seoul")
public void changeNowToPast() {
changeNowToPastService.execute();
}

}

0 comments on commit 09ccb48

Please sign in to comment.