|
On Error |
Description
As part of Automate's "tri-level" error handling options, this section enables errors to be handled on a per task basis. This is ideal if the user wants Automate to perform separate error handling procedures for each managed task. A task level error occurs when a certain step (action) within a task fails and Automate generates an error. This causes the task to notify the Automate Task Service of the failure which allows the task’s error level handing events to occur.
To access the On Error properties of a managed task, from Task Administrator's Managed Tasks view, right-click the desired task and select Go to > On Error.
Practical Usage
Provides options to specify what the task should do when an error occurs, such as sending an alert email, writing to a specific file, writing to the Windows Event Log or running another task that corrects the error.
Parameters
Property | Description |
---|---|
If enabled, an email will be sent upon error. The body of the email will contain details about the error that occurred, including task name, step number, the date/time of when the error occurred, and textual information about the error (if applicable). The default mail server settings configured in System > Options > E-Mail tab is used to send the message. | |
To | The email addresses of the recipients to notify if an error occurs. Multiple email addresses are specified by separating each with a semicolon (for example, sparky@networkautomation.com;jack@networkautomation.com). This parameter is active only if the Email parameter is enabled. |
From | The email address to use to send the error notification emails. Some mail servers require that this be a valid email address (for example, sparky@networkautomation.com), while others allow any text (for example, "Automate on Workstation2"). This parameter is active only if the Email parameter is enabled. |
Attach task file | If enabled, the corresponding task (.AML) file will be attached along with the email. This option is enabled by default. This parameter is active only if the Email parameter is enabled. |
Log file | If enabled, specifies the path and file name of the log file in which the error message will be written to. Errors that occurs can be sent to a task-specific log file specified by the user. This log file is separate from the Automate system Log file. |
Increment filename | If enabled, this option allows a number to be added to the file name in case the task logs more than one error. For example, when the error initially occurs, information is written to c:\temp\error.txt. Upon second occurrence, it will write to c:\temp\error001.txt, the third occurrence will write to c:\temp\Error002.txt, and so on. This parameter is active only if the Log file parameter is enabled. |
Add date time to filename | If enabled, the date and time when the error
occurred will be included in the file name. The default date format
is mm-dd-yyyy,
however, you can change the date format in the provided text box.
This parameter is active only if the Log
file parameter is enabled. NOTE:
When modifying the date format, make sure to omit any special characters
that cannot be included in a file name (for example, <,>,|,?,\,/). |
Run a task | If enabled, another managed task can be executed upon error (identical to the global error handling option Run Task on Error found in the On Task Error properties). For example, a default error handling task can be configured to run if an error occurs in the task. |
Run Task Settings | Clicking this button enables Task to Run, which specifies the managed task to run. Click the down arrow and select the task from the drop-down combo box that appears. |
Windows Event Log | If enabled, error details will be written to Windows Event Log upon error. |