fixing cleanup exitcode problem
This commit is contained in:
@@ -78,10 +78,14 @@ minutes_now=$( date "+%M" )
|
|||||||
|
|
||||||
# send the job
|
# send the job
|
||||||
srun --nodelist=${NODELIST[$INDEX]} "$JOBFILE"
|
srun --nodelist=${NODELIST[$INDEX]} "$JOBFILE"
|
||||||
|
exitcode=$?
|
||||||
# clear out old job definitions (semirandomly)
|
# clear out old job definitions (semirandomly)
|
||||||
if [ ! $( date "+%M" ) -eq $minutes_now ]
|
[[ -e "$JOBROOT"/.lastdel ]] || touch "$JOBROOT"/.lastdel
|
||||||
then find "$JOBROOT" -maxdepth 2 -mindepth 2 -type f -mtime +10 -delete
|
if test "$( find $JOBROOT/.lastdel -mmin +30 )"
|
||||||
|
then touch "$JOBROOT"/.lastdel
|
||||||
|
find "$JOBROOT" -maxdepth 2 -mindepth 2 -type f -mtime +10 -delete
|
||||||
find "$JOBROOT" -type d -depth -empty -delete
|
find "$JOBROOT" -type d -depth -empty -delete
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit $exitcode
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user