AX2544

Processing tasks in parallel

Each Scheduler job can have multiple tasks. By default, each task in the job is processed sequentially, in the order that the tasks are listed in the job.

If desired, you can configure tasks so that they are processed concurrently (in parallel) instead of sequentially. If appropriate, this may speed up the processing of the job.

Configuring tasks for parallel processing

In order to process tasks in parallel, the tasks must be configured to run as subordinate jobs (sub-jobs). To do this, edit the following settings in the Task Control section for each task:

  • Select Create a Subordinate Job for this Task.
  • Ensure that the following setting is not selected: Wait for all Subordinate Jobs to complete before proceeding to the next Task.

In the following example, if all four tasks are configured to be run as subordinate jobs, then they can be run in parallel (depending on the available Scheduler threads).

Scheduler task configured to run as a subordinate job to enable parallel processing

How parallel processing works

When a task is configured to execute as a subordinate job, then it is not processed within the "parent" job. Instead, a sub-job is created for the task. The sub-job joins the Scheduler queue and is eligible for processing according to the normal Scheduler processing rules. For more information, see Processing priority for scheduled jobs.

For example, imagine that you have a job with four tasks, and these tasks are not dependent on each other. If you use the default settings, Scheduler takes the first task in the list and starts processing. The second task is not started until the first task is complete, and so on.

If instead you configure each task as a sub-job, then when the "parent" job is processed, it will create four sub-jobs. If two Scheduler threads are available for processing, then two of the sub-jobs are processed at the same time. If four Scheduler threads are available, then all four sub-jobs are processed at the same time. Once all of the sub-jobs are complete, the parent job is completed, and its status reflects the overall status of all of the sub-jobs.

If tasks are dependent on each other, then you should not process them as sub-jobs, or you should use the Wait setting as appropriate. For example, imagine that the first four tasks in the job can be run in any order, but the fifth task must be processed last. In that case, you can configure the first four tasks to run as sub-jobs, but on the fourth task you must enable Wait for all Subordinate Jobs to complete before proceeding to the next Task. This will cause Scheduler to wait for all sub-jobs to finish before it proceeds to the fifth, final task.

In the following example, the file processing tasks are configured as sub-jobs so that they can be run in parallel. The last file processing task is configured to wait, so that all of the file processing tasks will be finished before the file collection task begins.

Scheduler task configured to wait for all subordinate jobs to complete