This section describes a methodical approach to troubleshooting tasks that do not run as expected.

In this Topic:

### Step 1: Verify the Task Did Not Run¶

Query the TASK_HISTORY table function to verify the task did not run. It is possible that the task ran successfully but the SQL statement in the task definition failed. In particular, note the scheduled and completed times, as well as any error code and message.

## Task Timed out or Exceeded the Schedule Window¶

There is a 60 minute default limit on a single run of a task. This limitation was implemented as a safeguard against non-terminating tasks. Query the TASK_HISTORY table function. If the task was canceled or exceeded the window scheduled for the task, the cause is often an undersized warehouse. Review the warehouse size and consider increasing it to fit within the schedule window or the one-hour limit.

Alternatively, consider increasing the timeout limit for the task by executing ALTER TASK … SET USER_TASK_TIMEOUT_MS = <num>. To determine if the USER_TASK_TIMEOUT_MS parameter has been set for a specific task, execute the following statement:

SHOW PARAMETERS LIKE 'USER_TASK_TIMEOUT_MS' IN TASK <task_name>;


Where <task_name> is the name of the task whose timeout limit you are adjusting. If the statement returns no record, the task currently has the default 3600000 millisecond (60 minute) timeout.

Note that neither increasing the warehouse size nor increasing the timeout limit might help if there are query parallelization issues. Consider looking at alternate ways to rewrite the SQL statement run by the task.