Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

findJob

Find job objects stored in cluster

Syntax

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

Arguments

c

Cluster object in which to find the job.

pending

Array of jobs whose State is pending in cluster c.

queued

Array of jobs whose State is queued in cluster c.

running

Array of jobs whose State is running in cluster c.

completed

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

jobs

Array of jobs found in cluster c.

p1, p2

Job object properties to match.

v1, v2

Values for corresponding object properties.

Description

jobs = findJob(c) returns an array, jobs, of all job objects stored in the cluster cluster. This statement is identical to accessing the Jobs property on the cluster, see parallel.Cluster. 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(c) returns arrays of all job objects stored in the cluster cluster, grouped by their current 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 deleted or whose status is unavailable are not returned by this function.

If the cluster is contained in a remote service, such as a cloud cluster, findJob results in a call to the remote service. This could result in findJob taking a long time to complete, depending on the number of jobs retrieved and the network speed. Also, if the remote service is no longer available, an error is thrown.

jobs = findJob(c,'p1',v1,'p2',v2,...) returns an array, jobs, of job objects whose property values match those passed as property-value pairs, p1, v1, p2, v2, etc. The property name must be a character vector, with the value being the appropriate type for that property. For a match, the object property value must be exactly the same as specified, including letter case. For example, if get returns the Name property value as MyJob, then findJob does not find that object while searching for a Name property value of myjob, as the match is case sensitive.

Input Arguments

collapse all

Cluster object in which to find the job.

Example: jobs=findJob(c)

  • [pending queued running]: array of jobs whose State is [pending queued running] respectively in cluster c.

  • completed: Array of jobs that have completed running, i.e., whose State is finished or failed in cluster c.

Example: pending=findJob(c)

Example: completed=findJob(c)

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example:

collapse all

Example:

Output Arguments

collapse all

Array of all job objects stored in the cluster, identical to accessing the Jobs property on the cluster; see parallel.Cluster.

Example: jobs = findJob(cluster)

Introduced before R2006a

Was this topic helpful?