[GH-ISSUE #1957] Add random delay option for script execution #3166

Closed
opened 2026-03-14 06:45:35 +03:00 by kerem · 1 comment
Owner

Originally created by @adamjrberry on GitHub (Aug 3, 2024).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1957

Please ignore - I was being a fool and requested something that already exists....

Is your feature request related to a problem? Please describe.
When deploying a script to lots of endpoints, it would be cool if TRMM had an option to add a random delay before execution of any script. I know this can be achieved by modifying scripts to add a delay in the script, but a native option would be great.

Describe the solution you'd like

A checkbox when deploying a script if you want to add a random delay, and then a box pops up (like the timeout field) that lets you specify the maximum delay (potentially a minimum delay as well)
image

In this example, running a Network Speedtest across all the endpoints at once wouldn't be a great idea. But if you can set to add a random delay, with a maximum of 2 hours for example, then there's a much better chance that the load will be spread out.
This would also be good for things like 3rd party patching scripts using things like choco (both to prevent bandwidth being throttled, but also to avoid hitting chocolatey rate limits).

Alternatively, perhaps a function that deploys a script in batches (i.e. deploy to 5 endpoints at a site, wait for success code, wait for 10 minutes, process next batch).

Describe alternatives you've considered

  • Adding a manual delay to scripts
  • Not tested, but adding a 'delay' script to the top of the hierarchy in the automated task section.

Additional context
While I haven't yet tested, it looks like it could potentially be possible to do this in a more 'hacky' way in the 'Automated Tasks' section, by creating a powershell script solely for the purposes of adding this delay, and making that the first action, then putting the actual action below. But it would be neat if there was a native server-side way of doing this that works cross-platform. In terms of architecture, I don't know what would be preferable - implementing it so that it deploys the script immediately to agents but adds the delay within that script, or whether it being purely server-side where the TRMM server waits a random period of time before actually pushing the script per device. I imagine the first option is probably easier to implement.

Originally created by @adamjrberry on GitHub (Aug 3, 2024). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1957 ### Please ignore - I was being a fool and requested something that already exists.... **Is your feature request related to a problem? Please describe.** When deploying a script to lots of endpoints, it would be cool if TRMM had an option to add a random delay before execution of any script. I know this can be achieved by modifying scripts to add a delay in the script, but a native option would be great. **Describe the solution you'd like** A checkbox when deploying a script if you want to add a random delay, and then a box pops up (like the timeout field) that lets you specify the maximum delay (potentially a minimum delay as well) ![image](https://github.com/user-attachments/assets/442bbdb2-357f-429d-b286-024acf0752a0) In this example, running a Network Speedtest across all the endpoints at once wouldn't be a great idea. But if you can set to add a random delay, with a maximum of 2 hours for example, then there's a much better chance that the load will be spread out. This would also be good for things like 3rd party patching scripts using things like choco (both to prevent bandwidth being throttled, but also to avoid hitting chocolatey rate limits). Alternatively, perhaps a function that deploys a script in batches (i.e. deploy to 5 endpoints at a site, wait for success code, wait for 10 minutes, process next batch). **Describe alternatives you've considered** - Adding a manual delay to scripts - Not tested, but adding a 'delay' script to the top of the hierarchy in the automated task section. **Additional context** While I haven't yet tested, it looks like it could potentially be possible to do this in a more 'hacky' way in the 'Automated Tasks' section, by creating a powershell script solely for the purposes of adding this delay, and making that the first action, then putting the actual action below. But it would be neat if there was a native server-side way of doing this that works cross-platform. In terms of architecture, I don't know what would be preferable - implementing it so that it deploys the script immediately to agents but adds the delay within that script, or whether it being purely server-side where the TRMM server waits a random period of time before actually pushing the script per device. I imagine the first option is probably easier to implement.
kerem closed this issue 2026-03-14 06:45:40 +03:00
Author
Owner

@adamjrberry commented on GitHub (Aug 3, 2024):

Sorry - I'm an absolute idiot, and this feature already exists..... facepalm....

<!-- gh-comment-id:2266703399 --> @adamjrberry commented on GitHub (Aug 3, 2024): Sorry - I'm an absolute idiot, and this feature already exists..... facepalm....
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#3166
No description provided.