diff --git a/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java b/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java index 724b904..b87eb9c 100644 --- a/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java +++ b/src/main/java/nl/andrewl/coyotecredit/service/TradeableUpdateService.java @@ -46,7 +46,7 @@ public class TradeableUpdateService { updatePublicTradeables(); } - @Scheduled(cron = "@midnight") + @Scheduled(cron = "0 0 0,6,12,18 * * *") public void scheduledUpdate() { updatePublicTradeables(); } diff --git a/src/main/java/nl/andrewl/coyotecredit/service/UserService.java b/src/main/java/nl/andrewl/coyotecredit/service/UserService.java index 5aa481e..054d576 100644 --- a/src/main/java/nl/andrewl/coyotecredit/service/UserService.java +++ b/src/main/java/nl/andrewl/coyotecredit/service/UserService.java @@ -136,6 +136,7 @@ public class UserService { } @Scheduled(cron = "@midnight") + @Transactional public void removeExpiredActivationTokens() { activationTokenRepository.deleteAllByExpiresAtBefore(LocalDateTime.now(ZoneOffset.UTC)); }