Skip to content

Commit

Permalink
set cron task to correct time (7am) again
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonEntholzer committed Dec 3, 2024
1 parent 4bda922 commit 1189383
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public UserSshPublicKeyExpiryNotificationService(UserSshPublicKeyRepository user
/**
* Notifies the user one week in advance about the upcoming expiry of one of their SSH keys
*/
@Scheduled(cron = "0 * * * * *") // execute this every morning at 7:00:00 am
@Scheduled(cron = "0 0 7 * * *") // execute this every morning at 7:00:00 am
public void notifyUserOnUpcomingKeyExpiry() {
ZonedDateTime fromDate = ZonedDateTime.now().plusDays(6);
ZonedDateTime toDate = ZonedDateTime.now().plusDays(7);
Expand All @@ -45,7 +45,7 @@ public void notifyUserOnUpcomingKeyExpiry() {
/**
* Notifies the user about the expiry of one of their SSH keys
*/
@Scheduled(cron = "0 * * * * *") // execute this every morning at 7:00:00 am
@Scheduled(cron = "0 0 7 * * *") // execute this every morning at 7:00:00 am
public void notifyUserOnKeyExpiry() {
ZonedDateTime fromDate = ZonedDateTime.now().minusDays(1);
ZonedDateTime toDate = ZonedDateTime.now();
Expand Down

0 comments on commit 1189383

Please sign in to comment.