Tasks
A task is simply a set of actions.
Named/Unnamed
A task can be given a name. This allows:
- the same task to be used in more than one profile
- easier identification of what the task does
- in the case of a task widget/shortcut,
it provides a label for the icon on the home screen.
When creating a profile,
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 Types
Execute
The actions in an execute task are carried out in sequence one by one.
Menu
When the profile of a Menu task is activated (or its widget/shortcut icon clicked)
a dialog pops up and the user can choose which action to execute by clicking on
one of the boxes.
If all items in the menu are Perform Task or Load App, then a grid of
only the corresponding icons will be shown.
If a Menu task is performed while the device is off, it will be turned
on for a short period.
The actions in a menu task are shown in a list.
Task Visibility
Unnamed tasks are only visible when editing the profile that they are associated
with.
Named tasks are visible on any screen that allows task editing (there are 3).
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:
- to represent the task on the home screen when it is used as a
widget or shortcut
- in the profile list screen
- when the task is used in another menu task
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.
When a task is deleted that is referred to in a profile, it is
automatically removed from that profile.
When a task is deleted that is referred to by a previously created anonymous
widget or task, the widget is unaffected. The widget has its own copy of the task in
order to make response to clicking it faster.
Task Scheduling
When there is a single task waiting to be executed, it's actions are executed one-by-one
until finished. A menu task is treated as a single action like a popup.
When there are several tasks in the queue at once, it's important to understand
how they are handled:
- only one action from the same action group can be executed at once to
prevent interference
- the task in the queue with the highest priority goes first and blocks lower priority tasks
- tasks with the same priority take turns executing an action
each, starting with the most recent addition to the queue
Task priority, 0 to 10 inclusive, is the same as that of the profile that runs it. Profile priority
can be set in the Profile Properties screen (press Menu in the
Profile Edit screen). The default value is 5. The priority of tasks run by
widgets or shortcuts can be set in Menu / Prefs / Action.
A couple of guidelines are:
- if you want a particular task to always interrupt other tasks that may be
executing, give it a high priority
- if you have a task that lasts for a while,
you probably want to give it a low priority so it doesn't block other tasks
from being executed.
Action Groups
Actions are divided into groups for scheduling based on how long the action takes to execute and what it
interferes with:
- Speech:
Say, Say To File
- Fix:
Get Location
- Proxy:
Display Brightness, Query Action, Lock, Enter Passphrase, Popup, Popup Task Names, Popup Task Icons,
Photo, Photo Series, Photo Series Time, Menu Tasks
- Normal: all other actions
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.
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:
- the new task is ignored (the default)
- the existing task is aborted and the new one starts from its first action.
The current action of the previous task is finished if it is already being carried out.
- both tasks run simultaneously
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 task)
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 Task button in the Task Edit screen.