fix schedule in scheduleMonthlyReboot
This commit is contained in:
parent
d50f61a4d6
commit
da73a87bca
1 changed files with 3 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue