Create new job from existing job
newjob = recreate(oldjob)
newjob = recreate(oldjob,'TaskID',ids)
New job object.
|Original job object to be duplicated.|
|Option to include only some tasks|
|Vector of integers specifying task IDs|
newjob = recreate(oldjob) creates a new
job object based on an existing job, containing the same tasks and
settable properties as
oldjob. The old job can
be in any state; the new job state is pending.
newjob = recreate(oldjob,'TaskID',ids) creates
a job object containing the tasks from
correspond to the tasks with IDs specified by
a vector of integers. Because communicating jobs have only one task,
this option supports only independent jobs.
Recreate an Entire Job
This example shows how to recreate the entire job
newJob = recreate(myJob)
Recreate a Job with Specified Tasks
This example shows how to recreate an independent job, which
has only the tasks with IDs 21 to 32 from the job
newJob = recreate(oldIndependentJob,'TaskID',[21:32]);
Recreate Jobs of a Specific User
This example shows how to find and recreate all failed jobs submitted by user Mary. Assume the default cluster is the one Mary had submitted her jobs to.
c = parcluster(); failedjobs = findJob(c,'Username','Mary','State','failed'); for m = 1:length(failedjobs) newJob(m) = recreate(failedjobs(m)); end