Skip to content

Commit

Permalink
chore: add testScheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 committed Aug 30, 2024
1 parent 9abfc40 commit e09d812
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/co/orange/ddanzi/service/SchedulerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.TimeZone;

@Slf4j
@Service
public class SchedulerService {
Expand All @@ -23,4 +25,11 @@ public void updateExpiredItems() {
log.info("Updating expired items");
itemService.updateExpiredItems();
}

@Scheduled(fixedRate = 10000)
public void testScheduler() {
log.info("Running test scheduler");
TimeZone tz = TimeZone.getDefault();
System.out.println("서버의 시간대: " + tz.getID());
}
}

0 comments on commit e09d812

Please sign in to comment.