Skip to content

Commit

Permalink
Whitespace cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
MWGMorningwood authored Dec 13, 2024
1 parent 2981f0f commit 5791e93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Function/Set-ScheduledTask.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ switch ($method) {

#Overall task comparison
Write-Debug "DEBUG: Scheduled task: $task"

#Fail condition
if ($null -eq $task) {
Write-Progress -Activity "Testing Scheduled Task" -CurrentOperation "Comparison failed - Task Missing" -Completed -Id 1
return $false
}

$Test_ScriptResult = Test-ScheduledTaskScript

$Test_DescResult = ( $task.Description -eq $TaskDesc )
Write-Progress -Activity "Testing Scheduled Task" -CurrentOperation "Description Comparison finished with result: $Test_DescResult" -PercentComplete 80 -Id 1

$TestResult = ( $Test_DescResult -and $Test_ScriptResult )
Write-Progress -Activity "Testing Scheduled Task" -CurrentOperation "Validation finished with result: $TestResult" -Completed -Id 1

$TestResult
}

Expand All @@ -101,7 +101,7 @@ switch ($method) {
}
Write-Debug "DEBUG: Trigger is set to $($using:Trigger)"
Write-Debug "DEBUG: Build Trigger: $buildtrigger"

# Check if the task exists and remove it if it does
if (![string]::IsNullOrWhiteSpace($using:task)){
Unregister-ScheduledTask -TaskName $using:TaskName -Confirm:$false
Expand Down

0 comments on commit 5791e93

Please sign in to comment.