Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

promote - Promote job in job manager queue

Syntax

promote(jm, job)

Arguments

jm

The job manager object that contains the job.

job

Job object promoted in the queue.

Description

promote(jm, job) promotes the job object job, that is queued in the job manager jm.

If job is not the first job in the queue, promote exchanges the position of job and the previous job.

Remarks

After a call to promote or demote, there is no change in the order of job objects contained in the Jobs property of the job manager object. To see the scheduled order of execution for jobs in the queue, use the findJob function in the form [pending queued running finished] = findJob(jm).

Examples

Create and submit multiple jobs to the scheduler identified by the default parallel configuration:

j1 = createJob('name','Job A');
j2 = createJob('name','Job B');
j3 = createJob('name','Job C');
submit(j1);submit(j2);submit(j3);

Assuming that the default parallel configuration uses a job manager, create an object for that job manager, and promote Job C by one position in its queue:

jm = findResource();
promote(jm, j3)

Examine the new queue sequence:

[pjobs, qjobs, rjobs, fjobs] = findJob(jm);
get(qjobs, 'Name')

    'Job A'
    'Job C'
    'Job B'

See Also

createJob, demote, findJob, submit

  


Recommended Products

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