Task Sequence
This feature allows you to run multiple tasks in sequence. You can run programs, email, web, ftp and all other tasks from the Sequence. If a certain task fails, you can choose to stop the Sequence. You can also skip ahead to another task in the Sequence. The Task Sequence task is an extension of the 7.x Chain task. In 8.x, this task was named Visual Script, but in 9.x renamed to a more appropriate Task Sequence.
Creating a Sequence
From the front panel: click
on the 'Task Sequence' button.
Adding Tasks to your Sequence
You can add new
tasks or existing tasks to your Sequence.
To add a new task: In
the task type tree, Select the task type and click on the Add New
Task button
To add an existing task: Click on the Add Existing
Task Button.
Email Notification of tasks in the Sequence
By
default, only the Sequence itself can trigger email notification
based on exit code. The tasks in a Sequence do not trigger
email notification, even if they satisfy an email notification
profile. You should select this option, in order to allow tasks
in the Sequence to trigger email notification. The Sequence
will move on to the next step, only after the email notification has
been completed.
Starting Sequence at specified step
You can
specify a step to start at, by entering the step number, or the step
title in this field. By default, the Sequence will start at
step 1, if this field is left blank.
Deleting Tasks from your Sequence
Select the
task in the bottom table and click the delete button.
Editing Tasks in your Sequence
Select the task
in the bottom table and click the edit button. The task parameters
will be loaded into the window. You can then make any changes
you require and click the "Update Task" button.
Positioning a Task within your Sequence
Select
the task in the bottom table and use the move-up or move-down buttons
as required.
Enable Step
You can enable or disable a step.
If a step is disabled, the task will move on to the next step.
Skip to Step options
You can choose to skip to
certain step in the Sequence, if a certain exit code criteria is
met. If you wish to stop the Sequence, because a certain exit
code criteria is met, enter a Skip to Step value, which is greater
than the total steps in the Sequence.
Skip to Step (or Title)
1) You can enter either
the step number in the Sequence, or the task title. This task title
has to be a valid title in the Sequence list.
2) You can also run
multiple tasks simultaneously using the following rules:
a)
Separate each Task Title by &. Example:
TaskTitle1&TaskTitle2&TaskTitle3 (no spaces allowed)
b)
You can only enter Task Titles, NOT step numbers.
c) TaskTitle1
has to be a valid Task Title in the Sequence list
d) TaskTitle1
CAN NOT be the last step in the Sequence list. You can add a dummy
delay task as the last step in the Sequence, if TaskTitle1 happens to
be your last step.
e) TaskTitle2, TaskTitle3 etc. DO NOT have to
be in the Sequence list. They have to be valid tasks in the task
list.
f) In this simultaneous mode, all tasks (TaskTitle2,
TaskTitle3. etc.) will be triggered simultaneously. The Sequence will
then continue normally at TaskTitle1.
Rerun Options
You can choose to rerun the task,
if it meets certain exit code criteria. You can also set the
maximum number of times to rerun a task. The task will rerun,
while the rerun criteria is valid, until the maximum rerun count has
been met.
Maximum Wait Time
This is the maximum time (T1)
the Sequence will wait for your task to finish. Enter 0 to wait
forever until the task finishes its run. Please
note that the Sequence will not kill or terminate your task because
it is unsafe to do so. It just waits for your task
to complete normally. If the task does not complete normally in
the allotted time, the Sequence will assume that the task has
failed. The email, web, ftp and most other tasks will terminate
normally.
For the DirChange and Command tasks,
please ensure that you can Terminate the task within the Task
settings itself. Both these tasks have a safe Termination time
(T2) that can be set within the task. Please set T1
T2. If you have set the Command or DirChange task to rerun
on failure, please set the T1 (T2+Td)*n, where Td is
the delay between reruns, and n is the number or reruns.
Why not just
Kill a task when the wait time is exceeded
Short
answer from us: In the Sequence, each task is run as a thread.
Killing a thread is unsafe, and may corrupt your system hours or days
in the future.
Long answer from Java documentation:
Because it is inherently unsafe. Stopping a thread causes it to
unlock all the monitors that were locked. (The monitors are unlocked
as the Thread Death exception propagates up the stack.) If any of the
objects previously protected by these monitors were in an
inconsistent state, other threads may now view these objects in an
inconsistent state. Such objects are said to be damaged. When threads
operate on damaged objects, arbitrary behavior can result. This
behavior may be subtle and difficult to detect, or it may be
pronounced. Unlike other unchecked exceptions, Thread Death kills
threads silently; thus, the user has no warning that his program may
be corrupted. The corruption can manifest itself at any time after
the actual damage occurs, even hours or days in the future.