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