Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7460 r7465 38 38 39 39 user=`whoami` 40 program=checkstardone 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 47 48 48 49 todofile=$listpath/ToDo-$table-$column.txt 49 getstatuslogpath=$logpath/getstatus/ checkstardone/$year50 getstatuslogpath=$logpath/getstatus/$program/$year 50 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 51 52 52 scriptlogpath=$logpath/run/ checkstardone/`date +%Y/%m/%d`53 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 53 54 makedir $scriptlogpath 54 scriptlog=$scriptlogpath/ checkstardone-$datetime.log55 scriptlog=$scriptlogpath/$program-$datetime.log 55 56 56 57 date >> $scriptlog 2>&1 … … 61 62 62 63 # check if script is already running 63 date > $lockpath/lock- checkstardone.txt >> $scriptlog 2>&164 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 64 65 checklock0=$? 65 66 case $checklock0 in 66 67 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 68 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkstardoneis running -> exit" >> $scriptlog 2>&169 echo "-> $program is running -> exit" >> $scriptlog 2>&1 69 70 date >> $scriptlog 2>&1 70 71 exit;; … … 80 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 81 82 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&183 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 83 84 date >> $scriptlog 2>&1 84 85 exit;; … … 90 91 echo "nothing to do -> exit" >> $scriptlog 2>&1 91 92 rm -v $todofile >> $scriptlog 2>&1 92 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&193 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 93 94 date >> $scriptlog 2>&1 94 95 exit … … 112 113 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 113 114 114 outpath=$logpath/ checkstardone/$no115 outpath=$logpath/$program/$no 115 116 echo "outpath: "$outpath >> $scriptlog 2>&1 116 117 makedir $outpath >> $scriptlog 2>&1 … … 129 130 done 130 131 131 setstatuslogpath=$logpath/setstatus/checkstardone/$no 132 makedir $setstatuslogpath >> $scriptlog 2>&1 133 134 check2=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-checkstardone-$dataset.log | grep int | sed -e 's/(int)//'` 135 case $check2 in 136 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;; 137 *) echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;; 138 esac 132 statustime="Now()" 133 failed="NULL" 134 starttime="NULL" 135 failedtime="NULL" 136 var1=$no 137 var2=$dataset 138 setstatus 139 139 done 140 140 141 141 rm -v $todofile >> $scriptlog 2>&1 142 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&1142 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 143 143 144 144 date >> $scriptlog 2>&1
Note:
See TracChangeset
for help on using the changeset viewer.