Changeset 7924 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 08/23/06 20:34:15 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
r7920 r7924 33 33 user=`whoami` 34 34 35 makedir $listpath 36 makedir $lockpath 35 set -C 36 37 makedir $listpath >> $jmscriptlog 2>&1 38 makedir $lockpath >> $jmscriptlog 2>&1 37 39 38 40 notcount=0 … … 55 57 queuedscript=`setzero $queuedscript` 56 58 57 pnototal=${pnototal[$hour]} 59 echo "date: "`date`" --- date +%k"`date +%k` >> $jmscriptlog 2>&1 60 echo "--- hour: $hour --- pnototal(hour): ${pnototal[$hour]} --- totalpno: $totalpno ---" >> $jmscriptlog 2>&1 61 totalpno=${pnototal[$hour]} 62 echo "--- hour: $hour --- pnototal(hour): ${pnototal[$hour]} --- totalpno: $totalpno ---" >> $jmscriptlog 2>&1 63 echo "date: "`date`" --- date +%k"`date +%k` >> $jmscriptlog 2>&1 64 58 65 #choose array according to the day of the week 59 66 case $dayofweek in … … 63 70 num=`echo "((( $i + 1 ) * 24 ) + ( $hour + 1 ) ) - 24 - 1 " | bc ` 64 71 pnoscript=${pnos[$num]} 65 echo " found $queued jobs in the queue (incl. running jobs) [allowed $ pnototal]" >> $jmscriptlog 2>&172 echo " found $queued jobs in the queue (incl. running jobs) [allowed $totalpno]" >> $jmscriptlog 2>&1 66 73 echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" >> $jmscriptlog 2>&1 67 74 # echo " => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" >> $jmscriptlog 2>&1 68 75 69 if [ "$queued" -gt "$ pnototal" ]76 if [ "$queued" -gt "$totalpno" ] 70 77 then 71 cont inue78 contex >> $jmscriptlog 2>&1 72 79 else 73 80 if [ "$queuedscript" -gt "$pnoscript" ] 74 81 then 75 cont inue82 contex >> $jmscriptlog 2>&1 76 83 fi 77 84 fi … … 81 88 checklock >> $jmscriptlog 2>&1 82 89 singleprocess="yes" 83 gettodo 90 gettodo >> $jmscriptlog 2>&1 84 91 rm -v $lockfile >> $jmscriptlog 2>&1 85 92 … … 89 96 makedir $condordir >> $jmscriptlog 2>&1 90 97 91 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2> $jmerrorlog98 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>> $jmerrorlog 92 99 then 93 100 date >> $jmerrorlog -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7917 r7924 314 314 then 315 315 echo "ERROR could not query process from db -> contex" 316 rm -v $lockfile 316 317 contex 317 318 fi … … 320 321 then 321 322 echo " => nothing to do" 323 rm -v $lockfile 322 324 contex 323 325 else … … 335 337 then 336 338 echo "$todofile exists already" 339 rm -v $lockfile 337 340 contex 338 341 fi
Note:
See TracChangeset
for help on using the changeset viewer.