Changeset 7476 for trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
- Timestamp:
- 02/03/06 16:42:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7471 r7476 43 43 table=DataSetProcessStatus 44 44 column=fStarFilesAvail 45 date=NULL46 datetime=`date +%F-%H-%M-%S`47 year=`date +%Y`48 45 49 46 todofile=$listpath/ToDo-$table-$column.txt 50 getstatuslogpath=$logpath/getstatus/$program/$year 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 47 lockfile=$lockpath/lock-$program.txt 52 48 53 49 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 57 53 date >> $scriptlog 2>&1 58 54 59 makedir $getstatuslogpath >> $scriptlog 2>&160 61 55 cd $mars 62 56 63 57 # check if script is already running 64 date > $lock path/lock-$program.txt>> $scriptlog 2>&158 date > $lockfile >> $scriptlog 2>&1 65 59 checklock0=$? 66 60 case $checklock0 in … … 74 68 75 69 # get todo list 76 echo "getting list..." >> $scriptlog 2>&1 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 78 79 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 86 esac 70 getdolist >> $scriptlog 2>&1 87 71 88 72 datasets=(`cat $todofile`) … … 90 74 then 91 75 echo "nothing to do -> exit" >> $scriptlog 2>&1 92 rm -v $todofile >> $scriptlog 2>&1 93 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 94 date >> $scriptlog 2>&1 95 exit 76 finish >> $scriptlog 2>&1 96 77 fi 97 78 … … 142 123 done 143 124 144 rm -v $todofile >> $scriptlog 2>&1 145 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 125 finish >> $scriptlog 2>&1 146 126 147 date >> $scriptlog 2>&1148
Note:
See TracChangeset
for help on using the changeset viewer.