Skip to content

Commit

Permalink
Fix license refresh cron annotation
Browse files Browse the repository at this point in the history
The annotation does also include seconds.
Also skip concurrent executions.
  • Loading branch information
SailReal committed Nov 29, 2023
1 parent 3c57a93 commit 81c3617
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 81c3617

Please sign in to comment.