Skip to main content

Conditions - Conditions​

The Conditions tab of the Add/Update condition set window lists the conditions in a Condition Set. Each condition is one check, for example whether a file exists or whether a Variable has a certain value. When a Job or Task uses the set, the Server checks every active condition and combines the results into one result. That result selects the action on the Actions tab.

To open the tab, go to Server -> Global objects -> Conditions. In the Manage Conditions window, click Add or Edit on the Condition set toolbar, then click the Conditions tab. The other tabs are described on Conditions - Main Settings and Conditions - Actions.

Server -> Global objects -> Conditions -> Add -> Conditions tab -> Add

The Conditions tab of the Add/Update condition set window with Add highlighted, and the Add/Edit condition window it opens. The Condition type list is open and shows VisualCron, File, Folder, Process, Service, Variable and .NET

Manage the conditions​

The toolbar above the list has Add, Edit, Clone and Delete. The same commands are on the shortcut menu when you right-click the list. Double-click a condition to edit it.

  • Add: opens the Add/Edit condition window for a new condition
  • Edit: opens the selected condition
  • Clone: opens a copy of the selected condition, which is saved as a new condition
  • Delete: removes the selected condition from the list without asking for confirmation

The changes on this tab are saved on the Server when you click OK in the Add/Update condition set window. You can also add, edit and delete conditions directly in the Manage Conditions window, where each change is saved at once.

Add/Edit condition window​

Each condition opens in the Add/Edit condition window. Its Main settings tab has these settings:

  • Condition type: the kind of check. A new condition starts as "VisualCron". The window shows a second tab with the settings of the chosen type
  • Description: the name of the condition, shown in the condition list
  • Active: checked for a new condition. Clear it to keep the condition in the set without checking it. The Server skips inactive conditions when it evaluates the set. A set with no active condition always returns On Match Error, see How the results combine

Click OK to keep the condition. The window first checks the required settings of the chosen type, for example that File path is filled in for a File condition.

Condition types​

  • VisualCron: the exit code, output or running state of a Job or Task
  • File: whether a file exists, or what it contains
  • Folder: whether a folder exists
  • Process: whether a process is running
  • Service: whether a Windows service, on the Server computer or a remote computer, has a certain status
  • Variable: a comparison of two values, for example a Variable and a fixed value
  • .NET: your own .NET code, which returns the result

How the results combine​

Each active condition returns a Match, a No match or a Match Error. The Server combines them into one result:

  • On Match All: every active condition returned a Match
  • On Match Any: at least one active condition returned a Match and at least one returned a No match
  • On Match None: every active condition returned a No match
  • On Match Error: at least one condition returned a Match Error, whatever the others returned, or the set has no active condition

The results do not overlap. When every condition returns a Match, only the On Match All action applies, not the On Match Any action. To act the same way whenever at least one condition matches, set the same action for both results on the Actions tab. With one active condition, the result is always On Match All, On Match None or On Match Error.

A condition returns a Match Error when it cannot be checked. Some examples:

  • the Job or Task that a VisualCron condition refers to no longer exists
  • the Credential chosen for a File or Folder condition cannot log on
  • a .NET condition fails or does not return True or False
warning

A Condition Set with no conditions, or with every condition inactive, always returns On Match Error. The default action for that result is "Exit". A Job that uses the set then exits on every run that applies its Condition Set, and a Task that uses the set is skipped and the Job starts no further Tasks (see When the Job's Condition Set is checked for runs that do not apply the Job's set). Clearing Active on every condition does not switch a set off. To stop using a set, clear its Use box on the Conditions tab of the Job or Task.