mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
This PR implements the item "register a scheduled task for certificate renewal" from the list of requirements described in #7365. This PR adds required instructions in the NSIS installer for Certbot to create a task, named "Certbot Renew Task" in the Windows Scheduler. This task is run twice a day, to execute the command certbot renew and keep the certificates up-to-date. Uninstalling Certbot will also remove this scheduled task. * Implementation * Corrections * Update template.nsi * Improve scripts * Add a random delay of 12 hours * Synchronize template against default one in pynsist 2.4 * Clean config of scheduled task * Install only in AllUsers mode * Add comments * Remove the logic of single user install
6 lines
189 B
PowerShell
6 lines
189 B
PowerShell
$taskName = "Certbot Renew Task"
|
|
|
|
$exists = Get-ScheduledTask | Where-Object {$_.TaskName -like $taskName}
|
|
if ($exists) {
|
|
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false
|
|
}
|