Run Queued Scripts
Summary
This script is scheduled to run every 3 days on the 'Machines With Queued Scripts' group by the CWM - Automate - Script - Queue Script script.
This script is designed to requeue itself every 3 days to ensure that it never enters the 'Fizzled' state.
The script retrieves stored data from the CWM - Automate - Custom Table - plugin_proval_queued_scripts table and executes the stored instances of scripts on the target machine.
Sample Run
This script should not be run manually.
Dependencies
- CWM - Automate - Solution - Queue Script Next Checkin
- CWM - Automate - Custom Table - plugin_proval_queued_scripts
- CWM - Automate - Script - Queue Script
- 'Machines With Queued Scripts' Group
Variables
Document the various variables in the script. Delete any section that is not relevant to your script.
Name | Description |
---|---|
TableName | What the variable represents. |
sqlscriptId | The script ID gathered from CWM - Automate - Custom Table - plugin_proval_queued_scripts. |
sqlscriptparameters | The parameters for the script ID to be called, gathered from CWM - Automate - Custom Table - plugin_proval_queued_scripts. |
GroupID | The Group ID for the 'Machines With Queued Scripts' Group. |
User Parameters
Name | Example | Required | Description |
---|---|---|---|
Silent | Yes | False | When toggled to yes, the script will not utilize the scripting engine to run the selected scripts. Each script will be called with a Run Script command from this script. This means that you will not see the requested script in the scripts table or on the computer itself; however, any logging on the requested script will show up under the Run Queued Scripts entry in the target machine's script. The intention of this option is to provide a less intrusive method of executing the scripts. If you notice script engine slowdown or inflation, try this silent setting. |
Process
- Retrieve the target computer's queued scripts from the custom table.
- Iterate through every entry for that target, executing each script with its parameters either silently or openly, depending on the silent value.
- Remove the queued script from the table after it has been executed.
- Once all scripts are executed, remove the machine from the group.
Output
- Script log