New feature iconJob Execution Task

Version Compatibility: Server version 5.0 or later Console version 5.0 or later.

The Job Execution Task allows a job to execute other jobs.

Usage Scenarios

The two major usage scenarios for this task are discussed here.

Executing Jobs in Sequence

The Job Control Action and Job Trigger allow you to link jobs together in sequence. However, these mechanisms work best when the execution sequence will always be the same: Job A is always followed by Job B, which is always followed by Job C. It is more complicated to also support a chain where Job B is run with Job D and Job E.

A Job Execution Task, by contrast, does not create any links among the jobs it runs. You can easily create a job that calls Job A, Job B, and Job C, and a separate job that calls Job D, Job B, and Job E, allowing Job B to be used in two different chains.

Simplifying Job Reuse

The Job Execution Task is especially useful when you have jobs that you need to run repeatedly but with different Job Variable values.

For example, suppose you have a job that performs data processing for a particular customer, and now you need to perform the same processing for an additional customer. In earlier versions of adTempus you might have accomplished this by making a copy of the job and changing Job Variables that are passed to tasks in the job, so that they target the new customer instead. The Job Execution Task makes it possible to treat a job as a reusable block of tasks. Now instead of creating and maintaining multiple copies of the data processing job, you can create a single job that uses Job Variables for any customer-specific details (such as file paths, customer IDs to send to programs, etc.). You can then create one or more simple "driver" jobs that use the Job Execution Task to call the processing job, sending different variable values each time.

Task Behavior

Remote Job Execution

There are two scenarios in which a Job Execution Task gets sent to another adTempus instance for execution:

When either of these conditions is met, adTempus attempts to send the command to the target computer immediately. If the command cannot be sent because the remote instance is not available, it is queued and sent once a connection to the remote instance is re-established. If the task is configured to wait for target jobs to execute, the calling job will continue to wait until the command is dispatched to the remote instance and executed. You can limit the amount of time the task waits for a connection to the remote instance by setting the Maximum time to wait for job dispatch option.

Multiple Instances of Target Job

If the target job runs in a queue that uses Distributed Scheduling and targets more than one Agent, executing the job may result in multiple instances of the job (one on each Agent where the job executes). In this case, the Job Execution Task waits for all instances of the target job to complete, and the success or failure of the target is based on all of those instances. To execute only a single instance of the target job, on the same Agent as the calling job, use the Run only on same agent option for the task.