How do I get the Slurm job id using the Perl API?

660 views Asked by At

In Slurm, a job submitted with the sbatch command-line tool returns its job id. How do I get the job id using the Perl API?

1

There are 1 answers

1
damienfrancois On

If you submit a job like this:

$resp = $slurm->submit_batch_job($job_desc_msg);

try and look into $resp for a new field named job_id

$jobid = $resp->{job_id} if $resp;

that would be set if the command was successful.