From b068601d8cd2d6f00754c43bf48764bb91088f55 Mon Sep 17 00:00:00 2001 From: ansgarz <ansgar.zwick@meissa.de> Date: Sun, 16 Mar 2025 19:18:02 +0100 Subject: [PATCH] [skip ci] add cmts --- .../framework/ubuntu/scheduledjobs/domain/ScheduledJobs.kt | 4 +++- src/main/resources/version.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobs.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobs.kt index dc41f1d..ef42da4 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobs.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobs.kt @@ -9,7 +9,9 @@ import org.domaindrivenarchitecture.provs.framework.ubuntu.scheduledjobs.infrast * ATTENTION: Use with care!! System will be shut down, restart might not succeed in all cases. */ fun Prov.scheduleMonthlyReboot() = task { - // reboot each first Tuesday a month - see https://blog.healthchecks.io/2022/09/schedule-cron-job-the-funky-way/ + // reboot each first Tuesday a month - see also https://blog.healthchecks.io/2022/09/schedule-cron-job-the-funky-way/ + // Day of month field "*/100,1-7" means “every 100 days starting from date 1, and also on dates 1-7”. + // Since there are no months with 100 days, this means “on dates 1 to 7” that are also (in this case) Tuesdays, which is exactly each first Tuesday in a month.. val schedule = "0 2 */100,1-7 * TUE" createCronJob("50_monthly_reboot", schedule, "/sbin/shutdown", "-r now", "root") } diff --git a/src/main/resources/version.txt b/src/main/resources/version.txt index 3ffcb2c..a94225a 100644 --- a/src/main/resources/version.txt +++ b/src/main/resources/version.txt @@ -1 +1 @@ -0.40.4-SNAPSHOT \ No newline at end of file +0.40.6-SNAPSHOT \ No newline at end of file