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|
The following properties are common to all task object types.
|Specify whether to return diary output|
|Date and time when the task is created|
|Text produced by execution of task object's function|
|Task error information|
|Task error identifier|
|Message from task error|
|Date and time when the task is finished|
|Function called when evaluating task|
|Task's numeric identifier|
|Input arguments to task function|
|Name of this task|
|Number of arguments returned by task function|
|Output arguments from running task function on worker|
|Job object containing this task|
|Date and time when the task is started|
|Current state of task|
|Information associated with this task object|
|Warning information issued during execution of the task, captured
in a struct array with the fields |
|Object representing worker that ran this task|
MJS task objects have the following properties in addition to the common properties:
|Information returned from failed task|
|Callback executed in client when task finishes|
|Maximum number of times to rerun failed task|
|Number of times tasked failed|
|Callback executed in client when task starts running|
|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