Streamline OneShot task handler
This commit is contained in:
parent
76da967793
commit
f136ad35ea
1 changed files with 4 additions and 2 deletions
|
@ -104,8 +104,10 @@ $null = New-Module {
|
||||||
};
|
};
|
||||||
|
|
||||||
Write-EventLog -LogName $logName -Source $logName -EventId $oneShotTrigger -Message "Starting OneShot task ``$(Get-OneShotTask)``…";
|
Write-EventLog -LogName $logName -Source $logName -EventId $oneShotTrigger -Message "Starting OneShot task ``$(Get-OneShotTask)``…";
|
||||||
Remove-Event -EventIdentifier (Wait-Event -SourceIdentifier $identifier).EventIdentifier;
|
|
||||||
$null = Wait-Event -SourceIdentifier $identifier;
|
for ($i = 0; $i -lt 2; $i++) {
|
||||||
|
Remove-Event -EventIdentifier (Wait-Event -SourceIdentifier $identifier).EventIdentifier;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Set-Stage $currentStage;
|
Set-Stage $currentStage;
|
||||||
|
|
Loading…
Reference in a new issue