SimpleHelp Community

How Do We Run More Than One Tool Consecutively?


#1

Using my prior RMM, I used to run about 20 ‘maintenance’ type PowerShell scripts twice a week at a specific time.
Basically, I would list the PS scripts in order that I wanted to run.
I would then schedule the days and times that I wanted the scripts to run.
The first script would run on schedule and the second would start after the first was completed.
This would continue until the 20 PS scrips completed.
In other words, I would not need 20 schedules IE one per PS script.

I cannot seem to find the instructions in the documentation.

Thank you in advance.


#2

So you can use the monitoring alerts.
Select custom to schedule a tool to run at your date and time. Then if the tool is good trigger all your scripts under actions.

Create another toolbox to use at the end the uses the scripting API to reset your alert:
ServerUtils AlertReset

If you want to manually run a bunch of tools in a certain order create a tool and use the scripting api to run them in the order you want.

This example runs the following toolboxs in the order from top to bottom, on the machine the toolbox was ran. The tech login for simplehelp is alicesmith and it runs toolboxs named Fix printer, checkedisk, runsfc, reboot computer.:
ServerUtilsRunTool(@ThisMachine(), @TechsByLogin(alicesmith), @Tool(Fix Printer))
ServerUtilsRunTool(@ThisMachine(), @TechsByLogin(alicesmith), @Tool(CheckDiskSpace))
ServerUtilsRunTool(@ThisMachine(), @TechsByLogin(alicesmith), @Tool(RUNSFC))
ServerUtilsRunTool(@ThisMachine(), @TechsByLogin(alicesmith), @Tool(Reboot Computer))

https://simple-help.com/toolbox-scripting-guide#run-a-tool