Child Task

A Task Step can be configured to execute another Task. In this way, tasks can be chained together to provide a sequence of tasks to be executed.

In this article, the following terminology is used:

Term Meaning
Child Task A Task that has been executed by a Task Step in another Task.
Parent Task A Task that has a Task Step that executes another Task.

Any Task can be the Parent or Child of any other Task.  In this way, complex hierarchies of Tasks can be created to satisfy different requirements.

Delaying Tasks

The execution of the Child Task can be delayed:

Example

A Child Task could be executed 12 hours after the Parent Task is executed.

The delay is specified as part of the Task Step and is specified in seconds. The Child Task will run X seconds after the Parent Task has executed.

Note

It is possible for a Parent Task to execute itself as the Child Task.  In this case, the minimum delay is 1 hour.

Note

The use of Delay is just one of the methods available to configure a Scheduled Task.

Task Security

A Child Task is executed using the same permissions that the Parent Task used when it was executed. See Task Security.

Ordinals

Task Steps have an ordinal, that controls the order of execution. When no delay is set, the Child Task will be executed immediately as part of the Task Step, respecting the ordinal.

However, when a delay is set, the ordinal controls when the Child Task is scheduled, not executed.

Examples

Let's consider 2 examples that are only different in the order of execution:

We have 2 Task Steps executed in the order shown: 

  1. Step A takes 10 minutes to execute
  2. Step B executes a Child task with a 5-minute delay

This means, that we first execute A, then schedule the child task to be executed 5 minutes later. So the Child task is being executed 15 minutes after the Task was initially triggered. 

For the second example, we have the same 2 Task Steps executed in the opposite order: 

  1. Step B executes a Child task with a 5-minute delay
  2. Step A takes 10 minutes to execute

In this case, we first schedule the Child task in Step B to run 5 minutes after the trigger, then the execution of A starts immediately. In this way Step A is started first, then 5 minutes later the Child Task is executed.

Warning

It can happen, that the Tasks are not executed in parallel. In the above example, this means, that even though the Child Task is scheduled to run 5 minutes after the trigger, it will only be executed when Step B finishes 10 minutes after the trigger. 

Task
Task Step
Scheduled Tasks

Comments