changed cron to 1h

This commit is contained in:
AddictionGames
2026-01-09 23:13:43 +02:00
parent 896566738a
commit 248e9cd4c9

View File

@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
/**
* Scheduled service for batch cleanup of expired sessions.
* Runs every minute to delete expired sessions in batches to avoid long transactions.
* Runs every hour to delete expired sessions in batches to avoid long transactions.
*/
@Slf4j
@Service
@@ -29,10 +29,10 @@ public class SessionCleanupService {
/**
* Batch deletes expired sessions.
* Runs every minute at second 0.
* Runs every hour at minute 0.
* Processes up to MAX_BATCHES_PER_RUN batches per run.
*/
@Scheduled(cron = "0 * * * * ?") // Every minute at second 0
@Scheduled(cron = "0 0 * * * ?") // Every hour at minute 0
@Transactional
public void cleanupExpiredSessions() {
LocalDateTime now = LocalDateTime.now();