# Tasks

A task is a unit of work that occurs every time a recipe performs an action that requires compute resources. Every time a recipe invokes an action provided by a connector counts as one task. This includes actions done with all connectors, including Workato tools (eg. Lookup tables, Variables by Workato).

A recipe job may consist of multiple tasks. The number of tasks executed in a job depends on the data of the specific trigger event and the recipe logic.

To find more information on where to find the number of tasks done in your Workato account, read on here.

# Task Rules

In general, all successfully run actions in a job are counted as tasks and failed actions are not counted.

  • All successfully run actions in ‘called’ recipe will be counted
  • All successfully run actions via jobs rerun (for example, UI, API, recipe ops) are counted
  • Successfully run actions in a failed job are counted i.e. if job fails at step 5, step 1-4 are counted

# Task Counting

Steps in a recipe with all the following apps are counted as tasks:

  • Platform connectors
  • Custom connectors (Installed from the Community Library/customer-built)
  • Workato tools (JSON parser, Variables, Lookup tables etc.)

The following table shows a breakdown of how tasks are counted with the different recipe steps:

Action Count
Trigger Will not be counted as a Task
Trigger conditions Will not be counted as a Task
Search/Create/Update/Get/Upsert/Lookup etc. Task is incremented by 1 for each of these Actions
Actions in repeat (for each loop) The Task is incremented by 1 for every action in the loop.
Control statement (If, Error monitor, stop) Will not be counted as a Task
Batch/bulk operations Task is incremented by 1

# Called Recipes

If a recipe is called successfully, the call to the recipe will be counted as a task. Thereafter, in the child job created, the actions in the recipe called will be counted as tasks.

Note: This applies to Callable recipes, Recipe functions, and API recipes.

# Rerunning Jobs

All tasks done in rerun jobs are counted as tasks.

# Examples

The examples for how tasks may be counted in recipes are as follows:

# Example 1

Task counting simple Simple recipe with three actions

Total Tasks per job = 3 (Step 2 + Step 3 + Step 4)

# Example 2

Task counting with IF Recipe with conditional actions

Total Tasks per job = 2 or 3, depending on whether the condition in the recipe is met.

  • Conditional statements do not incur any cost
  • The ‘Search customers in NetSuite’ step counts as 1 task regardless of the number of customers returned

Besides conditional actions, all other control statements: Conditional action with else, Action with error monitor, Call recipe, Stop, Repeat action will not be counted as tasks.

# Example 3

Task counting with list Recipe with repeated actions

Total Tasks per job = 1 + (2 x no. of rows)

Actions within a Repeat action are executed multiple times according to the number of items/rows present in the list. Thus, the number of tasks is multiplied by the number of items/rows.

Eg. If the number of rows in the ‘Repeat action’ is 5 then the total is 11 tasks.

# Example 4

Task counting with batch Recipe with a bulk action

1 task is done per bulk action, no matter how many rows are processed.

Total Tasks per job = 1

# Example 5

Task counting with batch Error monitor and errors

In the example above, the recipe fails on the 4th step 'Create customer in NetSuite'. Here the error retry step will attempt to retry steps 3, 4, and 5.

Maximum number of retries

Specify how you want to respond to an error. You may retry the action block up to a maximum of 3 re-tries. Learn more about Actions with error handling.

In this example, the retry fails and the recipe executes the 'On error' step (step 7), 'Send email via Gmail'. Since step 3 was execute twice, there are 2 counts of this task. Step 7 is also counted as a task.

Total Tasks per job = 3 (if the retry fails and the on error step is executed)

Otherwise if the action block succeeds on the second try, steps 3, 4, and 5 are counted as Tasks. Since step 3 was execute twice, there are 2 counts of this task.

Total Tasks per job = 4 (if the recipe succeeds on the second try)