|
Manage Condition Sets and Conditions |
Top Previous Next |
|
Condition sets and the included conditions are "global", which means that once a condition set or a condition is defined, it can be selected by one or more jobs and/or tasks.
Only one condition set can be selected by a unique job or task but a condition set can have many conditions which form a final result.
A condition set or a condition is defined either from the main menu Manage -> Manage conditions dialog or from the Add job/Edit job menu under the Conditions tab.
With conditions, the internal flow of tasks included in a job or the job itself, can be controlled. Conditions are different kinds of "checks" which are evaluated before a job or a task is launched. One common condition could be if the previous task returns an error based on the exit code. The outcome of the condition evaluation results in an action. The action could be to exit the job because of the previous "failure".
Conditions are also evaluated before Notifications. If a condition check returns false then neither the job/task nor the notification is run. Thus the basic flow now looks like:
Condition set and conditions The evaluation of a condition set can only result in one action. Several conditions may be specified for one condition set. The condition set includes the following settings:
The condition set criteria determine how the results of all included conditions are evaluated. The following condition set criteria are valid:
One or more conditions may be included in one condition set. A condition uses the following settings:
Condition types Each condition type uses specific associated parameters. The following condition types exist:
Actions The following actions exist:
Run task notes: When Run task is used VisualCron tries to find the specified task within the current job. If found it runs that task and tasks that may follow, in order. When the task does not reside within the current job VisualCron only runs the task alone and no following tasks. If you need changes to this behaviour then please contact support.
Wait notes: The wait for each action is a pause between the actual condition check and the action. It can be used in several ways but is most commonly used with the "Retry" action. For example, you want to check if a file exists, but the condition check fails to find the file and thus the result is "Match None". With this result you want to Retry (check again if the file exists) and by the wait parameter you add a pause between each check.
The Wait action is not used at the first check when using the "Retry" action. This means that it won't pause before the first check, but on the following retries. For other action types, the "Wait" action is always used independent on if it is the first time or not.
How the Actions affect jobs and tasks The actions has different effects on jobs and tasks. The simple reason for that is that Jobs by themselves have no connection to each other like the tasks, which are internally connected within a job. Actions affecting a job condition:
Actions affecting a task condition:
Default values When a condition set is added these default values are set and can be configurable:
Handling of errors By default, all errors that occur in the condition check leads to the "Exit" action. Example of errors the can occur:
Note: Task flow only makes sense when using Run tasks in order. Task conditions are only checked on jobs which has the setting Run tasks in order on. |