Random delay on schedules

Product: PowerShell Universal
Version: 2.5.0

Hi,

Not sure if i should request features here, or somewhere else - but i will give it an try :slight_smile:
We would like an option to have an random delay on schedules / triggers, as we know it from Windows Task Scheduler.

The reason is we have 8-10 jobs running every 15 minutes, that each consume about 1-2 CPU cores.
But PSU executes them on standard schedules (fx 00:00, 00:15, 00:30, 00:45) and are draining the host from CPU performance.

So to have the ability to put an random delay for X number of minutes, would really help us a lot :slight_smile:

2 Likes

I opened an issue for this. Should be fairly easy to implement and useful!

I added this to the top of every job to do exactly that:

Start-Sleep -seconds $(get-random -min 1 -max 120)

Edit: every job that runs on a schedule

Thats also an solution, but i would prefer if the scheduling was only managed from 1 source :slight_smile: