- Timestamp:
- 02/03/06 16:49:10 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles ¶
r7471 r7477 44 44 table=SequenceProcessStatus 45 45 column=fSequenceFileWritten 46 date=NULL47 datetime=`date +%F-%H-%M-%S`48 year=`date +%Y`49 46 50 47 todofile=$listpath/ToDo-$table-$column.txt 51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 48 lockfile=$lockpath/lock-$program.txt 53 49 54 50 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 58 54 date >> $scriptlog 2>&1 59 55 60 makedir $getstatuslogpath >> $scriptlog 2>&161 62 56 cd $mars 63 57 64 58 # check if script is already running 65 date > $lock path/lock-$table-$column.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 75 69 76 70 # get todo list 77 echo "getting list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 79 80 case $check0 in 81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 83 rm -v $todofile >> $scriptlog 2>&1 84 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 85 date >> $scriptlog 2>&1 86 exit;; 87 esac 71 getdolist >> $scriptlog 2>&1 88 72 89 73 # get sequences from todo file … … 92 76 then 93 77 echo "nothing to do -> exit" >> $scriptlog 2>&1 94 rm -v $todofile >> $scriptlog 2>&1 95 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 96 date >> $scriptlog 2>&1 97 exit 78 finish >> $scriptlog 2>&1 98 79 fi 99 80 … … 110 91 111 92 writesequencefilelogpath=$logpath/$program/$no 112 echo "$programlogpath: "$writesequencefilelogpath >> $scriptlog 2>&1113 93 makedir $writesequencefilelogpath >> $scriptlog 2>&1 94 writesequencefilelog=$writesequencefilelogpath/writesequencefile-$no2.log 114 95 115 96 echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1 116 97 setstatus "start" >> $scriptlog 2>&1 117 98 118 check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog path/writesequencefile-$no2.log| grep int | sed -e 's/(int)//'`99 check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog | grep int | sed -e 's/(int)//'` 119 100 case $check2 in 120 101 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; … … 128 109 done 129 110 130 rm -v $todofile >> $scriptlog 2>&1 131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 111 finish >> $scriptlog 2>&1 132 112 133 set +C134 135 date >> $scriptlog 2>&1136
Note:
See TracChangeset
for help on using the changeset viewer.