Setting Pre and Post Scripts
Pre and post scripts provide the ability to setup an environment before running the task and to cleanup that environment upon task completion. The post script also provides the ability to do analysis of the task upon completion and possibly alter the status. It could also capture additional output for the task.
See Agent Scripting Methods for options.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
Pre Script check box |
Check the Pre Script check box to specify a script to run before the task executes.
|
||||||
Post Script check box |
Check the Post Script check box to specify a script to run after the task executes. Specify or enter the script as described for the Pre Script option. |
||||||
Get Script from file check box | Select the Get Script from file check box and enter the fully qualified path to the file containing the script in the Filename field. | ||||||
Always run script check box | Select the Always run script check box if you want the specified script to run when the task completes regardless of the status. Otherwise, the script will only run if the task complete successfully. |
Not supported on all task service types.