Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

demote - Demote job in job manager queue

Syntax

demote(jm, job)

Arguments

jm

The job manager object that contains the job.

job

Job object demoted in the job queue.

Description

demote(jm, job) demotes the job object job that is queued in the job manager jm.

If job is not the last job in the queue, demote exchanges the position of job and the job that follows it in the queue.

Remarks

After a call to demote or promote, 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 job manager identified by the default parallel configuration:

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

Demote one of the jobs by one position in the queue:

demote(jm, j2)

Examine the new queue sequence:

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

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

See Also

createJob, findJob, promote, 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