File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,7 @@ function Add-CIPPScheduledTask {
128128 $epochSeconds = [int64 ]$DesiredStartTime
129129 # Set ScheduledTime to the desired time
130130 $task.ScheduledTime = $epochSeconds
131- }
132- catch {
131+ } catch {
133132 Write-Warning " Failed to parse DesiredStartTime: $DesiredStartTime . Using provided ScheduledTime."
134133 # Fall back to default
135134 if ([int64 ]$task.ScheduledTime -eq 0 -or [string ]::IsNullOrEmpty($task.ScheduledTime )) {
@@ -214,6 +213,7 @@ function Add-CIPPScheduledTask {
214213 $ErrorMessage = Get-NormalizedError - Message $_.Exception.Message
215214 return " Could not add task: $ErrorMessage "
216215 }
216+ Write-LogMessage - headers $Headers - API ' ScheduledTask' - message " Added task $ ( $entity.Name ) with ID $ ( $entity.RowKey ) " - Sev ' Info' - Tenant $tenantFilter
217217 return " Successfully added task: $ ( $entity.Name ) "
218218 }
219219 } catch {
You can’t perform that action at this time.
0 commit comments