Reputation: 1557
Is there a way to submit a job to slurm with sbatch and record the job id into a variable?
job_id = sbatch --account my_account some_script.sh
echo $job_id
17210254
Upvotes: 8
Views: 2004
Reputation: 1557
This can be done with --parsable
job_id=$(sbatch --parsable test.sh)
echo $job_id
17211434
Upvotes: 11