Access task properties and behaviors
A parallel.Task object provides access to a task, which executes on a worker as part of a job.
The following table describes the available types of task objects, determined by the type of cluster.
|parallel.task.MJSTask||Task on MJS cluster|
|parallel.task.CJSTask||Task on CJS cluster|
All task type objects have the same methods, described in the following table.
|cancel||Cancel job or task|
|delete||Remove job or task object from cluster and memory|
|listAutoAttachedFiles||List of files automatically attached to job, task, or parallel pool|
|wait||Wait for job to change state or for GPU calculation to complete|
The following properties are common to all task object types.
|CaptureDiary||Specify whether to return diary output|
|CreateTime||When task was created|
|Diary||Text produced by execution of task object's function|
|Error||Task error information|
|ErrorIdentifier||Task error identifier|
|ErrorMessage||Message from task error|
|FinishTime||When task finished running|
|Function||Function called when evaluating task|
|ID||Task's numeric identifier|
|InputArguments||Input arguments to task function|
|Name||Name of this task|
|NumOutputArguments||Number of arguments returned by task function|
|OutputArguments||Output arguments from running task function on worker|
|Parent||Job object containing this task|
|StartTime||When task started running|
|State||Current state of task|
|UserData||Information associated with this task object|
|Worker||Object representing worker that ran this task|
MJS task objects have the following properties in addition to the common properties:
|FailureInfo||Information returned from failed task|
|FinishedFcn||Callback executed in client when task finishes|
|MaximumRetries||Maximum number of times to rerun failed task|
|NumFailures||Number of times tasked failed|
|RunningFcn||Callback executed in client when task starts running|
|Timeout||Time limit, in seconds, to complete task|
CJS task objects have no properties beyond the properties common to all clusters.
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