parallel.Job

Access job properties and behaviors

Constructors

createCommunicatingJob, createJob, findJob, recreate

getCurrentJob (in the workspace of the MATLAB worker)

Container Hierarchy

Parent

parallel.Cluster

Children

parallel.Task

Description

A parallel.Job object provides access to a job, which you create, define, and submit for execution.

Types

The following table describes the available types of job objects. The job type is determined by the type of cluster, and whether the tasks must communicate with each other during execution.

Job TypeDescription
parallel.job.MJSIndependentJobJob of independent tasks on MATLAB® Job Scheduler cluster
parallel.job.MJSCommunicatingJobJob of communicating tasks on MATLAB Job Scheduler cluster
parallel.job.CJSIndependentJobJob of independent tasks on CJS cluster
parallel.job.CJSCommunicatingJobJob of communicating tasks on CJS cluster

Methods

Common to All Job Types

The following methods are common to all job object types.

cancelCancel job or task
createTaskCreate new task in job
deleteRemove job or task object from cluster and memory
diaryDisplay or save Command Window text of batch job
fetchOutputsRetrieve output arguments from all tasks in job
findTaskTask objects belonging to job object
listAutoAttachedFilesList of files automatically attached to job, task, or parallel pool
loadLoad workspace variables from batch job
recreateCreate new job from existing job
submitQueue job in scheduler
waitWait for job to change state

CJS Jobs

CJS job objects have the following methods in addition to the common methods:

getTaskSchedulerIDsScheduler IDs of tasks in job

Properties

Common to All Job Types

The following properties are common to all job object types.

PropertyDescription
AdditionalPathsFolders to add to MATLAB search path of workers
AttachedFilesFiles and folders that are sent to workers
AutoAddClientPathSpecifies whether user-added-entries on the client’s path are automatically added to each worker’s path
AutoAttachFilesSpecifies if dependent code files are automatically sent to workers
CreateDateTimeDate and time when the job is created
EnvironmentVariablesNames of environment variables that are sent to the workers
FinishDateTimeDate and time when the job finishes running
IDJob’s numeric identifier
JobDataInformation made available to all workers for job’s tasks
NameName of job
ParentCluster object containing this job
StartDateTimeDate and time when the job starts running
StateState of job: 'pending', 'queued', 'running', 'finished', or 'failed'
SubmitDateTimeDate and time when the job is submitted to the queue
TagLabel associated with job
TasksArray of task objects contained in job
TypeJob type: 'independent', 'pool', or 'spmd'
UserDataInformation associated with job object
UsernameName of user who owns job

MATLAB Job Scheduler Jobs

MATLAB Job Scheduler independent job objects and MATLAB Job Scheduler communicating job objects have the following properties in addition to the common properties:

PropertyDescription
AuthorizedUsersUsers authorized to access job
FinishedFcnCallback function executed on client when this job finishes
NumWorkersRangeMinimum and maximum limits for number of workers to run job
QueuedFcnCallback function executed on client when this job is submitted to queue
RestartWorkerTrue if workers are restarted before evaluating first task for this job
RunningFcnCallback function executed on client when this job starts running
TimeoutTime limit, in seconds, to complete job

CJS Jobs

CJS independent job objects do not have any properties beyond the properties common to all job types.

CJS communicating job objects have the following properties in addition to the common properties:

PropertyDescription
NumWorkersRangeMinimum and maximum limits for number of workers to run job

Help

To get further help on a particular type of parallel.Job object, including a list of links to help for its properties, type help parallel.job.<job-type>. For example:

help parallel.job.MJSIndependentJob
Introduced in R2012a