Skip to Main Content Skip to Search
Product Documentation

promote - Promote job in MJS cluster queue

Syntax

promote(c,job)

Arguments

c

The MJS cluster object that contains the job.

job

Job object promoted in the queue.

Description

promote(c,job) promotes the job object job, that is queued in the MJS cluster c.

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

Tips

After a call to promote or demote, there is no change in the order of job objects contained in the Jobs property of the MJS cluster 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(c).

Examples

Create and submit multiple jobs to the cluster identified by the default cluster profile, assuming that the default cluster profile uses an MJS:

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

Promote Job C by one position in its queue:

promote(c,j3)

Examine the new queue sequence:

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

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

See Also

createJob | demote | findJob | 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