How To: Link Jobs Together

Often you will want to link two or more jobs together so that one job is run when another finishes. In adTempus this is done using either Responses that run Job Control Actions or with Job Triggers. In many cases the two approaches are interchangeable, but there are some differences.

When you use Job Control Actions:

When you use Job Triggers:

Linking with a Job Control Action

In this example we will run the "Target" job when the "Source" job succeeds.

  1. Create and save both the Source job and the Target job .
  2. Edit the Source job and go to the Responses page of the Job Properties.
  3. Click Add to add a new Response.
  4. In the Response Properties window, go to the Events section and click Add.
  5. In the Response Event Properties window, select the "Job Succeeded" event and click OK.
  6. Back in the Response Properties window, go to the Actions section and click Add.
  7. In the Select Action window, select "Control a job or job step" and click OK.
  8. In the Job Control Action Properties window,

    1. Select the "Run a job" action.
    2. Under Applies To, select Another job on the same computer, then click Select... and select the Target job.
    3. Configure any other options as desired.
    4. Click OK to save the Action.
  9. Click OK to save the Response, and OK again to save the job.

The jobs are now linked together (no configuration is required on the Target job).

In this example we want the Target job to run when the Source job succeeds. The link can also be based on many other criteria. For example, you could run a different Target job when the Source job fails. This is determined by the Event that you selected in step 5 above. See the Job Responses topic for information on the other Events that are available.

You could also run the Response from a particular step instead by using the Responses page of the step properties. This allows you to choose from additional events, such as running the Target job based on the exit code from a program that you run.

Linking with a Job Trigger

In this example we will again run the "Target" job when the "Source" job succeeds.

  1. Create and save both the Source job and the Target job .
  2. Edit the Target job and go to the Triggers page of the Job Properties.
  3. Click Add to add a new Trigger.
  4. In the Select Trigger Type window, select "Execute in response to another job" and click OK.
  5. In the Job Trigger Properties window, click Add on the Job Trigger page to add a new trigger rule.
  6. In the Job Trigger Target Rule window,

    1. Under Trigger based on job, select Another job on the same computer, then click Select... and select the Source job.
    2. Leave all other settings at their default
    3. Click OK to save the rule.
  7. Click OK to save the trigger, and OK again to save the job.

The jobs are now linked together (no configuration is required on the Source job).

Related Concepts

Job Control Action

Job Trigger