schedulerIDs = getTaskSchedulerIDs(job)
returns the SchedulerID of each task on the job
job. Note that SchedulerID applies only to
third-party schedulers.
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
createTask(job,@ode45,2,{@vdp1,[0,10],[idx,0]});
end
submit(job)
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.
getTaskSchedulerIDs(job)
ans = 1×1 cell array
{'4933'}
In this case, the scheduler has assigned the ID 4933 to this job.