Skip to content

Commit 16be2df

Browse files
committed
add partitionkey
1 parent 350678e commit 16be2df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Start-UserTasksOrchestrator {
88

99
$Table = Get-CippTable -tablename 'ScheduledTasks'
1010
$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')"
11+
$Filter = "PartitionKey eq 'ScheduledTask' and (TaskState eq 'Planned' or TaskState eq 'Failed - Planned' or (TaskState eq 'Running' and Timestamp lt datetime'$1HourAgo'))"
1212
$tasks = Get-CIPPAzDataTableEntity @Table -Filter $Filter
1313
$Batch = [System.Collections.Generic.List[object]]::new()
1414
$TenantList = Get-Tenants -IncludeErrors

0 commit comments

Comments
 (0)