Main Content


Scheduler IDs of tasks in job



schedulerIDs = getTaskSchedulerIDs(job) returns the SchedulerID of each task on the job job. Note that SchedulerID applies only to third-party schedulers.


collapse all

Create a cluster object by using parcluster. In the code below, change MyThirdPartyScheduler to the name of the profile of your third-party scheduler.

c = parcluster('MyThirdPartyScheduler');

Create a job and create some tasks for it. Then, submit the job.

job = createJob(c);
for idx = 1:2

To get the scheduler IDs of the tasks on the job, use getTaskSchedulerIDs. You can use these IDs to refer to the corresponding jobs on the third-party scheduler.

ans = 1×1 cell array

In this case, the scheduler has assigned the ID 4933 to this job.

Wait for the job to finish and fetch its outputs.

out = fetchOutputs(job)
out = 2×2 cell array
    {121×1 double}    {121×2 double}
    {129×1 double}    {129×2 double}

When you are done retrieving information from the job, delete it to clean up its data.

clear job

Input Arguments

collapse all

Job object that represents the job on the third-party scheduler, specified as a parallel.Job object.

Example: job = createJob(parcluster);

Data Types: parallel.Job

Output Arguments

collapse all

SchedulerID of each task on job, returned as a cell array of character vectors.

Introduced in R2019b