From 81c361742a57445af7ccc27cec41b3a6bdb93a99 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Wed, 29 Nov 2023 16:26:54 +0100 Subject: [PATCH] Fix license refresh cron annotation The annotation does also include seconds. Also skip concurrent executions. --- .../main/java/org/cryptomator/hub/license/LicenseHolder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java b/backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java index b39b92fc..4a647114 100644 --- a/backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java +++ b/backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java @@ -101,9 +101,9 @@ public void set(String token) throws JWTVerificationException { } /** - * Attempts to refresh the Hub licence every day at 01:00 UTC if claim refreshURL is present. + * Attempts to refresh the Hub licence every day at 01:00:00 UTC if claim refreshURL is present. */ - @Scheduled(cron = "0 1 * * * ?", timeZone = "UTC") + @Scheduled(cron = "0 0 1 * * ?", timeZone = "UTC", concurrentExecution = Scheduled.ConcurrentExecution.SKIP) void refreshLicenseScheduler() throws InterruptedException { if (license != null) { var refreshUrl = licenseValidator.refreshUrl(license.getToken());