parallel.Task

Access task properties and behaviors

Constructors

createTask, findTask

getCurrentTask (in the workspace of the MATLAB worker)

Container Hierarchy

Parent

parallel.Job

Children

none

Description

A parallel.Task object provides access to a task, which executes on a worker as part of a job.

Types

The following table describes the available types of task objects, determined by the type of cluster.

Task TypeDescription
parallel.task.MJSTaskTask on MJS cluster
parallel.task.CJSTaskTask on CJS cluster

Methods

All task type objects have the same methods, described in the following table.

cancelCancel job or task
deleteRemove job or task object from cluster and memory
listAutoAttachedFilesList of files automatically attached to job, task, or parallel pool
waitWait for job to change state

Properties

Common to All Task Types

The following properties are common to all task object types.

PropertyDescription
CaptureDiarySpecify whether to return diary output
CreateTimeWhen task was created
DiaryText produced by execution of task object's function
ErrorTask error information
ErrorIdentifierTask error identifier
ErrorMessageMessage from task error
FinishTimeWhen task finished running
FunctionFunction called when evaluating task
IDTask's numeric identifier
InputArgumentsInput arguments to task function
NameName of this task
NumOutputArgumentsNumber of arguments returned by task function
OutputArgumentsOutput arguments from running task function on worker
ParentJob object containing this task
StartTimeWhen task started running
StateCurrent state of task
UserDataInformation associated with this task object
WorkerObject representing worker that ran this task

MJS Tasks

MJS task objects have the following properties in addition to the common properties:

PropertyDescription
FailureInfoInformation returned from failed task
FinishedFcnCallback executed in client when task finishes
MaximumRetriesMaximum number of times to rerun failed task
NumFailuresNumber of times tasked failed
RunningFcnCallback executed in client when task starts running
TimeoutTime limit, in seconds, to complete task

CJS Tasks

CJS task objects have no properties beyond the properties common to all clusters.

Help

To get further help on either type of parallel.Task object, including a list of links to help for its properties, type:

help parallel.task.MJSTask
help parallel.task.CJSTask
Was this topic helpful?