Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Staggering Deploy Times?

I have about 30 servers I'll be adding to a Deploy Task, and they will need a reboot afterward. However, I'd like to randomly stagger these installs/reboots about 5 minutes apart, in order to reduce stress on the physical boxes.

What's a good way to accomplish this? I don't see any good default options in the schedule options.

An idea I have: In my deploy task, set Step 1 to be a script with a randomized counter on it. (Like PAUSE for 1 - 20 minutes, then RETURN code 0). PDQ will then advance to the next Step. Not the most eloquent solution though.

Any ideas of tips? Thanks!

0

Comments

3 comments
Date Votes
  • I would use PowerShell for it.

    #Pick a randominteger from an array then use it in Start-Sleep 
    $Sleep_Time = 60, 120, 360, 600 | Get-Random
    
    Start-Sleep -Seconds $Sleep_Time 
    
    0
  • In options you can set the concurrent target per deployment. Set that to 5 and have a final step of your deployment being a reboot. Once the reboot is complete, the task is marked complete and the next 5 can start.

    0
  • Simple, perfect. Thanks!

    0