-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsleep_n_run.sh
More file actions
20 lines (20 loc) · 861 Bytes
/
sleep_n_run.sh
File metadata and controls
20 lines (20 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
while true;do
while qstat | grep 'phillict' | grep 'parallel_sa50 ' | egrep ' [RQ] ' | grep janus-normal;do
echo "Waiting for job to complete"
jid=$(qstat | grep 'phillict' | grep 'parallel_sa50 ' | egrep ' [RQ] ' | grep janus-normal | cut -f 1 -d ' ')
echo "================================= CHECKJOB ==================================="
checkjob $jid
echo "================================= SHOWSTART =================================="
showstart $jid
id=$(echo $jid | cut -f 1 -d '.')
if [ -f parallel_sa50.o$id ];then
echo "==================================== LOG ====================================="
tail -n 10 "parallel_sa50.o$id"
echo "=============================================================================="
fi
sleep 5m
done
echo "Running new job"
qsub run.sh
sleep 1h
done