From b59800b8749cf374d393583e4fca05e09cdab7d2 Mon Sep 17 00:00:00 2001 From: clr2of8 Date: Fri, 10 Nov 2023 10:48:37 -0800 Subject: [PATCH] dedicated cleanup task for runner --- Public/Invoke-SetupAtomicRunner.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/Invoke-SetupAtomicRunner.ps1 b/Public/Invoke-SetupAtomicRunner.ps1 index 0a4463e..71be422 100755 --- a/Public/Invoke-SetupAtomicRunner.ps1 +++ b/Public/Invoke-SetupAtomicRunner.ps1 @@ -68,7 +68,7 @@ function Invoke-SetupAtomicRunner { $task = New-ScheduledTask -Action $taskAction -Principal $taskPrincipal -Trigger $triggers -Description "A task that runs 1 minute or later after boot to start the atomic test runner script" # setup scheduled task that will start the runner cleanup task after restart $taskName2 = "KickOff-AtomicRunnerScheduledTask" - Unregister-ScheduledTask $taskName -confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask $taskName2 -confirm:$false -ErrorAction Ignore $taskAction2 = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-exec bypass -Command Invoke-KickoffAtomicRunner -scheduledTaskCleanup" $taskPrincipal = New-ScheduledTaskPrincipal -UserId $artConfig.user $task2 = New-ScheduledTask -Action $taskAction2 -Principal $taskPrincipal -Trigger $triggers -Description "A task that runs 1 minute or later after boot to start the atomic test runner cleanup script"