foam_sync.ps1 (LIFEBALANCE) 2025-06-18T23:57:41Z
This commit is contained in:
@ -56,8 +56,7 @@ $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (Ne
|
|||||||
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -NonInteractive -ExecutionPolicy Bypass -File `"$scriptPath`""
|
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -NonInteractive -ExecutionPolicy Bypass -File `"$scriptPath`""
|
||||||
|
|
||||||
# Task settings
|
# Task settings
|
||||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Hours 1) `
|
$settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit (New-TimeSpan -Minutes 1)
|
||||||
-StopIfGoingOnBatteries:$false # Explicitly ensure it doesn't stop
|
|
||||||
|
|
||||||
# Check and configure the scheduled task
|
# Check and configure the scheduled task
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user