Fix Windows scheduled startup failures

This commit is contained in:
2026-09-07 13:15:18 +08:00
parent 44ce5e655d
commit 9778981191
6 changed files with 62 additions and 4 deletions
+3
View File
@@ -28,6 +28,7 @@ try {
-StartWhenAvailable `
-MultipleInstances IgnoreNew `
-ExecutionTimeLimit ([TimeSpan]::Zero) `
-AllowStartIfOnBatteries `
-DontStopIfGoingOnBatteries `
-RestartCount 3 `
-RestartInterval (New-TimeSpan -Minutes 1)
@@ -36,6 +37,7 @@ try {
-StartWhenAvailable `
-MultipleInstances IgnoreNew `
-ExecutionTimeLimit ([TimeSpan]::Zero) `
-AllowStartIfOnBatteries `
-DontStopIfGoingOnBatteries
}
@@ -57,6 +59,7 @@ $WatchdogSettings = New-ScheduledTaskSettingsSet `
-StartWhenAvailable `
-MultipleInstances IgnoreNew `
-ExecutionTimeLimit (New-TimeSpan -Minutes 2) `
-AllowStartIfOnBatteries `
-DontStopIfGoingOnBatteries
Register-ScheduledTask `