diff --git a/foam_sync.ps1 b/foam_sync.ps1 index 03787ba..40806db 100644 --- a/foam_sync.ps1 +++ b/foam_sync.ps1 @@ -2,7 +2,6 @@ # --- Configuration --- $frequencyMinutes = 2 # How often the Scheduled Task should attempt to run this script -$executionTimeLimitBufferSeconds = 30 # Buffer: task stops if it runs longer than (frequency - buffer) # --- Scheduled Task Setup --- $taskName = "FoamGitSync" @@ -80,7 +79,9 @@ try { Write-Host "Scheduled task '$taskName' is already correctly configured." } else { - Write-Host "Scheduled task '$taskName' configuration differs. Attempting to update in-place..." + Write-Host "Scheduled task '$taskName' configuration differs." + Write-Host "`$triggerMatches: $triggerMatches, $actionMatches: $actionMatches, $principalMatches: $principalMatches, $settingsMatch: $settingsMatch`" + Write-Host "Attempting to update in-place..." try { Set-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -Settings $settings -Principal $taskPrincipal -ErrorAction Stop Write-Host "Scheduled task '$taskName' updated successfully."