sbatch(1) --dependency=afterok:$(sbatch
Submit a batch script to SLURM
-d, --dependency=<dependency_list>
       Defer  the  start  of  this  job  until  the specified dependencies have been satisfied completed.
       <dependency_list> is of the form  <type:job_id[:job_id][,type:job_id[:job_id]]>.   Many  jobs  can
       share  the  same  dependency and these jobs may even belong to different  users. The  value may be
       changed after job submission using the scontrol command.
source manpages: sbatch