Changeset 7477 for trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
- Timestamp:
- 02/03/06 16:49:10 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7474 r7477 49 49 table=SequenceProcessStatus 50 50 column=fCallisto 51 date=NULL52 datetime=`date +%F-%H-%M-%S`53 year=`date +%Y`54 51 #pno=500 # number of processes, i.e. number of todo-files 55 52 56 53 todofile=$listpath/ToDo-$table-$column 57 getstatuslogpath=$logpath/getstatus/$program/$year 58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 lockfile=$lockpath/lock-getting-$program-list.txt 59 55 60 56 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 64 60 date >> $scriptlog 2>&1 65 61 66 makedir $getstatuslogpath >> $scriptlog 2>&167 68 62 cd $mars 63 64 # check if getting of list is already running 65 date > $lockfile >> $scriptlog 2>&1 66 checklock0=$? 67 case $checklock0 in 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 70 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 71 date >> $scriptlog 2>&1 72 exit;; 73 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 74 esac 69 75 70 76 # get todo file … … 75 81 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 76 82 else 77 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 78 checklock0=$? 79 case $checklock0 in 80 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 81 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 82 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 83 date >> $scriptlog 2>&1 84 exit;; 85 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 86 esac 87 88 echo "getting list..." >> $scriptlog 2>&1 89 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 90 91 case $check0 in 92 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 93 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit;; 97 esac 98 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 83 # get todo list 84 getdolist >> $scriptlog 2>&1 85 rm -v $lockfile >> $scriptlog 2>&1 99 86 fi 100 87 … … 135 122 then 136 123 echo "nothing to do -> exit" >> $scriptlog 2>&1 137 rm -v $todofile >> $scriptlog 2>&1 138 rm -v $lockfile >> $scriptlog 2>&1 139 date >> $scriptlog 2>&1 140 exit 124 finish >> $scriptlog 2>&1 141 125 fi 142 126 … … 272 256 done 273 257 274 rm -v $todofile >> $scriptlog 2>&1 275 rm -v $lockfile >> $scriptlog 2>&1 276 277 set +C 278 279 date >> $scriptlog 2>&1 280 258 finish >> $scriptlog 2>&1 259
Note:
See TracChangeset
for help on using the changeset viewer.