Skip to main content

Job dependencies

In briefA job runs only when all of its dependencies are satisfied. A Job dependency waits on another job's result, a Threshold dependency on a threshold's value, a Resource dependency on free units of a resource, and an Expression dependency on an expression that renders True. A job dependency has a Condition, a Type and a Days Offset.

WhereThe Dependencies tab of the job editor, opened from a job in Design › Workflows, or from a job of a running instance in Processes. Add New Dependency adds one; its Dependency Type picks Job, Threshold, Resource or Expression. On the workflow canvas, drawing an edge between two jobs opens the New Dependency dialog.

When

  • One job must wait for another to finish OK, to fail, or either.
  • Two jobs must never run at the same time, or a job must never overlap another copy of itself.
  • A job must wait for a threshold value, enough of a shared resource, or a condition you can express.

To decide which days a job is in the run at all, use its frequencies instead; see Frequencies.

How

  1. Open the job's Dependencies tab and select Add New Dependency.
  2. Choose the Dependency Type. For a job dependency, pick the Workflow and Job Name, then set Condition, Type and Days Offset.
  3. Save the job, then commit and deploy the workflow.

The full steps are on Order jobs with dependencies.

Notes
  • Requires waits when the predecessor is not in the run for the date; After proceeds. Conflict keeps two jobs from running together and takes no Condition.
  • Any is the ignore-error union of the success and failure statuses. A cancelled predecessor, or one that missed its start time, satisfies no Condition.
  • Days Offset runs from −365 to +365. A job cannot depend on itself on the same day.
Watch out
  • A Requires dependency on a predecessor that never comes waits indefinitely. Use After for an optional predecessor.
  • An expression that renders anything other than True or False, including a number, puts the job on hold.
  • A conflict on a different workflow that carries only the workflow's name matches it case-sensitively. A name that differs in case matches nothing, and the conflict does not hold the job.