| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Parallel Computing Toolbox |
| Contents | Index |
| Learn more about Parallel Computing Toolbox |
The State property reflects the stage of an object in its life cycle, indicating primarily whether or not it has yet been executed. The possible State values for all Parallel Computing Toolbox objects are discussed below in the "Values" section.
Note The State property of the task object is different than the State property of the job object. For example, a task that is finished may be part of a job that is running if other tasks in the job have not finished. |
Usage | Task, job, job manager, or worker object |
Read-only | Always |
Data type | String |
For a task object, possible values for State are
pending — Tasks that have not yet started to evaluate the task object's Function property are in the pending state.
running — Task objects that are currently in the process of evaluating the Function property are in the running state.
finished — Task objects that have finished evaluating the task object's Function property are in the finished state.
unavailable — Communication cannot be established with the job manager.
For a job object, possible values for State are
pending — Job objects that have not yet been submitted to a job queue are in the pending state.
queued — Job objects that have been submitted to a job queue but have not yet started to run are in the queued state.
running — Job objects that are currently in the process of running are in the running state.
finished — Job objects that have completed running all their tasks are in the finished state.
failed — Job objects when using a third-party scheduler and the job could not run because of unexpected or missing information.
destroyed — Job objects whose data has been permanently removed from the data location or job manager.
unavailable — Communication cannot be established with the job manager.
For a job manager, possible values for State are
running — A started job queue will execute jobs normally.
paused — The job queue is paused.
unavailable — Communication cannot be established with the job manager.
When a job manager first starts up, the default value for State is running.
For a worker, possible values for State are
running — A started job queue will execute jobs normally.
unavailable — Communication cannot be established with the worker.
Create a job manager object representing a job manager service, and create a job object; then examine each object's State property.
jm = findResource('scheduler','type','jobmanager', ...
'name','MyJobManager','LookupURL','JobMgrHost');
get(jm, 'State')
ans =
running
j = createJob(jm);
get(j, 'State')
ans =
pendingcreateJob, createTask, findResource, pause, resume, submit
![]() | StartTime | SubmitArguments | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |