...
Codeblock | ||
---|---|---|
| ||
# submit a first job, extract job id sbatch_outputjobid=$(sbatch --parsable job1.sbatch) jobid=${sbatch_output##* } # submit a second job with dependency: starts only if the previous job terminates successfully) sbatch_outputjobid=$(sbatch --parsable --dependency=afterok:$jobid job2.sbatch) jobid=${sbatch_output##* } # submit a third job with dependency: starts only if the previous job terminates successfully) sbatch_outputjobid=$(sbatch --parsable --dependency=afterok:$jobid job3.sbatch) |
...