2026.3.4 OneTime scheduled jobs only show up on the computer they were registered with

Backlog

2026.3.4 OneTime scheduled jobs only show up on the computer they were registered with

avatar

We have two nodes, when we schedule a one time job the job is only present on the node that called New-PSUSchedule. My expectation is that either node would be able to pick up the one time job, and that both nodes would be able to see the job.

This is a problem for us since we schedule one time jobs from other jobs, and since those other jobs might run on either node the one time jobs get scheduled multiple times.

All Comments (3)

avatar

Hello realslacker,

Thank you for the detailed report.

We reproduced this on a two-node 2026.3.4 cluster in our lab and confirmed the cause.

When New-PSUSchedule -OneTime runs, the schedule is added only to the schedule list of the node that handled the call.

It is also saved in the shared database, but the other node reads it from there only when its service starts.

This is why the other node does not show the schedule until it restarts.

This is also the likely cause of your duplicates.

A job that checks for an existing schedule before it creates one only sees the schedules of its own node.

So when the same job runs on the other node, it creates a second schedule.

There is a more serious effect you should know about.

When the scheduled time comes, the run goes through two steps, and each step can land on either node.

If either step lands on the node that does not know the schedule, the run is dropped and no job is created.

In our test, 19 of 24 one-time runs were dropped this way.

The node that dropped a run logs one of these errors in its system log:

  • Failed to execute job with schedule <name>, followed by Schedule <name> not found

  • Schedule <name> not found.

The dropped runs do not show up as failed jobs.

They are not gone for good, though.

They stay in the database, and the next time either node restarts, they all start at once, even if their time passed long ago.

We have reported this to our development team as a bug.

Until it is fixed, we recommend not creating one-time schedules from jobs on a multi-node setup.

Instead, have the parent job start the follow-up script with Invoke-PSUScript, using the same connection your jobs use today for New-PSUSchedule.

Add -Queue with a node name or computer group if the follow-up must run on a given node.

We tested this in the same lab, and the follow-up ran on the node we chose.

If the follow-up has to wait, you have two options:

  • For short delays, pass the start time as a parameter and have the script wait until then.

  • For longer delays, store the pending work in a shared table and start the due items from one regular schedule in schedules.ps1, loaded by both nodes.

The second option also prevents duplicates, since the parent job can check the shared table before it adds an item.

Could you share the lines that create the schedule, including how its name is built?

This will help us confirm which of these effects you are seeing.

The schedule and cmdlet documentation is here:

https://docs.devolutions.net/powershell-universal/automation/schedules

https://docs.devolutions.net/powershell-universal/powershell-commands/invoke-psuscript

Best regards,

Patrick Ouimet

avatar

This is the relevant code from the scheduling portion:

$Script = Get-PSUScript -Name 'Invoke-PatchingChangeRequestJob.ps1' -Integrated
$ScheduleName = 'PREFIX.{0}.{1}' -f $Script.Name.Replace('.ps1',''), $CREQ.Key # $CREQ is an PSCustomObject and Key is a string
New-PSUSchedule -Name $ScheduleName -Script $Script -Parameters @{ ChangeRequest = $CREQ.Key } -OneTime $StartTime -Folder Patching -Integrated | ForEach-Object {
    Write-Information ( 'Job Scheduled: {0}' -f $_.Name )
}
avatar

Hello realslacker,

Thank you for the code.

Since the name is built from the script name and the change request key, the same change request always gives the same schedule name.

In version 2026.3.4, each node checks a new name only against its own schedule list.

If the node that runs New-PSUSchedule already lists that name, the server refuses the call with an error saying a schedule with that name already exists.

If the call runs on the other node, it is accepted, and it replaces the pending run of the first schedule in the shared database with a new one at the new start time.

So the second schedule you see on the other node carries the same name, and while a run is pending, only one run stays queued for that change request.

A run whose schedule only one node lists can still be dropped as described in our last message.

After a run, the name is removed only from the node that ran it, so a node that still lists it keeps refusing that name until it restarts.

Our recommendation to start the follow-up with Invoke-PSUScript still stands, and our development team is working on the fix.

If you do see the follow-up job run more than once for the same change request, please send the job ID, computer name and start time of each of those jobs.

Best regards,

Patrick Ouimet