Demote job in cluster queue
Cluster object that contains the job.
Job object demoted in the job queue.
demote(c,job) demotes the job object
job that is queued in the cluster
job is not the last job in the queue,
demote exchanges the position of
the job that follows it in the queue.
Create and submit multiple jobs to the MATLAB® Job Scheduler identified by the default parallel configuration:
c = parcluster(); pause(c) % Prevent submissions from running. j1 = createJob(c,'Name','Job A'); j2 = createJob(c,'Name','Job B'); j3 = createJob(c,'Name','Job C'); submit(j1);submit(j2);submit(j3);
Demote one of the jobs by one position in the queue:
Examine the new queue sequence:
[pjobs,qjobs,rjobs,fjobs] = findJob(c); get(qjobs,'Name')
'Job A' 'Job C' 'Job B'
After a call to
promote, there is no change in the
order of job objects contained in the
Jobs property of the
cluster object. To see the scheduled order of execution for jobs in the queue, use
findJob function in the form
[pending queued running finished] = findJob(c).
Introduced before R2006a