# the next line doesn't make sense since it's the default anyway. Just to demonstrate. policy.setProperty(DefaultResubmitPolicy.RESTART_WAITING_JOBS, True) restarted = multiPartJob.restart(policy, True) if restarted: print "Job distribution for restarted jobs:" for subLoc in multiPartJob.getOptimizationResult().keySet(): resubmitted = True print subLoc + " : " +multiPartJob.getOptimizationResult().get(subLoc) else: print "Job not restarted (yet)." print "Job not finished yet. Waiting..." time.sleep(3) print "Multipartjob "+multiPartJob.getBatchJobname()+" finished." # finally, everything is ready. We could do a lot more here, but you get the idea... for job in multiPartJob.getJobs(): print "Job: "+job.getJobname()+", Status: "+job.getStatusString(False) print print "Stdout: " print job.getStdOutContent() print print "Stderr: " print job.getStdErrContent() print print print "Finished."