You can set an alert condition, called a notification, to any script result in a package, which can then be used to generate an alert when the automation package is used in a scheduled task. Notifications are useful when you want to set up individual alerts for scripts in a package, as opposed to an alert for the package as a whole.
To set up alert notifications on a script in a package, you specify the script result that triggers an alert, and you can provide the message that appears in the body of any alert emails generated, for example, "Succeeded". An alert email from a scheduled task can include many of these messages in a single email, and you can set up multiple alert conditions for each script.
In Service Center, click Automation > Library.
To access the script package you want to modify, do one of the following:
In the Name column, begin typing the name of the script package.
Click the triangle beside the Category in which the script package resides.
Script packages are indicated with a package icon .
Click the name of the script package.
In the Package Content area, click the name of the script for which you want to set a notification condition.
In the Notifications area, click Add.
From the Condition list, select the type of condition.
In the Value box, type the text of the return code, standard error, or standard output that you selected in the previous step.
In the Script Notification Message area, type the message that will appear in the body of any alert emails.
Click Save.