Changeset 7476 for trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
- Timestamp:
- 02/03/06 16:42:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
r7471 r7476 44 44 table=DataSetProcessStatus 45 45 column=fFillGanymed 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 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 # retrieve datasets 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 … … 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.