#!/bin/bash ##Please update , and Jobid= Chkfilename= Email= ################################################### # The SLURM_JOBID can be identified by squeue or the chkfiledir in the working directory # The new atjob will be run 5 minutes later Hostname=`srun --jobid=$Jobid hostname` srun --jobid=$Jobid at now + 5 minutes << EOF cp -p /tmp/$USER/g09-scratch/$Jobid/$Chkfilename $Jobid-chkfiledir/$Hostname.$Chkfilename echo "" | mail -s "g09 chkfile has been copied from $Hostname to $Jobid-chkfiledir" $Email rm -rf /tmp/$USER/g09-scratch/$Jobid EOF