Skip to Main Content Skip to Search
Product Documentation

findJob - Find job objects stored in scheduler

Syntax

out = findJob(sched)
[pending queued running completed] = findJob(sched)
out = findJob(sched,'p1',v1,'p2',v2,...)

Arguments

sched

Scheduler object in which to find the job.

pending

Array of jobs whose State is pending in scheduler sched.

queued

Array of jobs whose State is queued in scheduler sched.

running

Array of jobs whose State is running in scheduler sched.

completed

Array of jobs that have completed running, i.e., whose State is finished or failed in scheduler sched.

out

Array of jobs found in scheduler sched.

p1, p2

Job object properties to match.

v1, v2

Values for corresponding object properties.

Description

out = findJob(sched) returns an array, out, of all job objects stored in the scheduler sched. Jobs in the array are ordered by the ID property of the jobs, indicating the sequence in which they were created.

[pending queued running completed] = findJob(sched) returns arrays of all job objects stored in the scheduler sched, by state. Within pending, running, and completed, the jobs are returned in sequence of creation. Jobs in the array queued are in the order in which they are queued, with the job at queued(1) being the next to execute. The completed jobs include those that failed. Jobs that are destroyed or whose status is unavailable are not returned by this function.

out = findJob(sched,'p1',v1,'p2',v2,...) returns an array, out, of job objects whose property names and property values match those passed as parameter-value pairs, p1, v1, p2, v2.

Note that the property value pairs can be in any format supported by the set function, i.e., param-value string pairs, structures, and param-value cell array pairs. If a structure is used, the structure field names are job object property names and the field values are the appropriate property values to match.

When a property value is specified, it must use the same exact value that the get function returns, including letter case. For example, if get returns the Name property value as MyJob, then findJob will not find that object while searching for a Name property value of myjob.

See Also

createJob | findResource | findTask | parcluster | submit

  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS