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 647e955..404f53f 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 @@ -17,7 +17,7 @@ fun Prov.scheduleMonthlyReboot() = task { // ensure shutdown command exists if (checkFile(shutdown, sudo = true)) { // reboot each first Tuesday in a month at 3:00 - createCronJob("50_monthly_reboot", "0 3 1-7 * 2", "$shutdown -r now", "root") + createCronJob("50_monthly_reboot", "0 2 1-7 * 2", "$shutdown -r now", "root") } else { addResultToEval(ProvResult(false, err = "$shutdown not found.")) } diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobsKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobsKtTest.kt index e20c882..896a369 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobsKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/scheduledjobs/domain/ScheduledJobsKtTest.kt @@ -29,6 +29,6 @@ class ScheduledJobsKtTest { val fqFilename = "/etc/cron.d/50_monthly_reboot" assertTrue(prov.checkFile(fqFilename), "") val actualFileContent = prov.fileContent(fqFilename, sudo = true) - assertEquals("0 3 1-7 * 2 root /sbin/shutdown -r now\n", actualFileContent) + assertEquals("0 2 1-7 * 2 root /sbin/shutdown -r now\n", actualFileContent) } } \ No newline at end of file