We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891f833 commit 226e79dCopy full SHA for 226e79d
Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1
@@ -7,7 +7,8 @@ function Start-UserTasksOrchestrator {
7
param()
8
9
$Table = Get-CippTable -tablename 'ScheduledTasks'
10
- $Filter = "TaskState eq 'Planned' or TaskState eq 'Failed - Planned'"
+ $1HourAgo = (Get-Date).AddHours(-1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
11
+ $Filter = "TaskState eq 'Planned' or TaskState eq 'Failed - Planned' or (TaskState eq 'Running' and Timestamp lt datetime'$1HourAgo')"
12
$tasks = Get-CIPPAzDataTableEntity @Table -Filter $Filter
13
$Batch = [System.Collections.Generic.List[object]]::new()
14
$TenantList = Get-Tenants -IncludeErrors
0 commit comments