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 cd67cef..dc41f1d 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,6 +9,7 @@ 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 in a month at 3:00 - createCronJob("50_monthly_reboot", "0 2 1-7 * 2", "/sbin/shutdown", "-r now", "root") + // reboot each first Tuesday a month - see https://blog.healthchecks.io/2022/09/schedule-cron-job-the-funky-way/ + val schedule = "0 2 */100,1-7 * TUE" + createCronJob("50_monthly_reboot", schedule, "/sbin/shutdown", "-r now", "root") }