mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 15:05:57 +03:00
[GH-ISSUE #1957] Add random delay option for script execution #3166
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#3166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)

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
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.
@adamjrberry commented on GitHub (Aug 3, 2024):
Sorry - I'm an absolute idiot, and this feature already exists..... facepalm....