Tasker: Tasks

Tasks

A task is simply a set of actions which are performed one after the other.

Named / Anonymous Tasks

A task can be given a name. This allows:

When creating a profile, widget or shortcut, often the associated task will consist only of one or two actions which will not be reused. For this case, Tasker allows you to create a task without a name (an Anonymous task).

Task Visibility

Anonymous tasks are only visible when editing the profile that they are associated with.

Named tasks are visible on any screen that allows task editing. Any changes made to the set of tasks in any screen is reflected in all the other screens.

Task Icon

Each task has an associated icon, by default a question mark. The icon is used

Deleting Tasks

Named tasks can only be deleted via the Delete button on the Task Edit screen. Unnamed tasks are deleted automatically when the profile they are part of is deleted, or a named task is selected for that profile.

Named tasks cannot be deleted while a profile still refers to them.

When a task is deleted that is referred to by a previously created named widget or task, the widget will stop working.

Android does not allow Tasker to automatically remove the widget from the Home Screen.

Task Scheduling

When there is a single task waiting to be executed, it's actions are executed one-by-one until finished.

When there are several tasks in the queue at once, it's important to understand how they are handled:

Task priority, 0 to 50 inclusive with 0 being lowest, is determined according to whatever causes the task to run.

A couple of guidelines are:

Action Groups

Actions are divided into groups for scheduling based on how long the action takes to execute and what it interferes with:

Wait Actions

Wait and Wait Until are special cases. The rules for handling them are complicated and try to do the 'best thing' dependent on the situation.

Same-Profile Tasks

Tasks launched by the same profile by default always execute in the order in which they are launched. Other tasks from the same profile remain completely inactive until any previous task from the same profile is complete. The main purpose of this rule is to correctly handle rapid changes in a profile's activation state.

This behaviour can be disabled by deselecting Enforce Task Order in the Profile Properties dialog.

Example
This example demonstrates the effect of Enforce Task Order and shows also how sub-tasks launched by Perform Task are handled.
Profile: Example
Enter Task: Enter1
   Perform Task, Enter2
Exit Task: Exit1
   Perform Task, Exit2
With Enforce Task Order:

Enter1 and Enter2 are both guaranteed to finish before either of Exit1 or Exit2. Whether Enter1 or Enter2 finishes first depends on their relative priority. Same for Exit1 and Exit2. All 4 tasks compete based on priority against tasks from other profiles. Exit tasks have a higher base priority so will finish before Enter tasks.

Without Enforce Task Order:

If the profile goes active and inactive quickly, Enter1, Enter2, Exit1 and Exit2 will all compete purely on priority. Since Exit tasks have higher base priority, Exit1 and Exit2 will probably finish first.

Collisions

Sometimes a task needs to be executed of which a copy is already executing. This can happen quite often e.g. when a task widget button is pressed twice quickly, or a task contains a Wait action or shows a dialog.

The way in which a collision is resolved is specified by the user. There are 3 options:

Note that the last option can lead to several copies of a task all running at once.

Behaviour When Device Off

By default, after a few seconds of the screen being off Android will power down the device and thus running tasks will be paused.

In the Task Properties dialog, it can be specified that a task should keep running.

Dialogs
An action that shows some kind of dialog (such as a lock screen, popup, menu) blocks execution of any other action, even one of higher priority, until it is completed.
Wait / Wait Until
These are exceptions. A wait action can be interrupted by another task's action and will resume (if necessary) when the other task's action is finished.

Killing Tasks

If you have a problem with a task that never ends, you can manually end tasks with the Kill button in the Task Edit screen.