Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7460 r7465 37 37 38 38 user=`whoami` 39 program=doexclusions 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column.txt 52 getstatuslogpath=$logpath/getstatus/ doexclusions/$year53 getstatuslog=$getstatuslogpath/getstatus- doexclusions-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ doexclusions/`date +%Y/%m`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/ doexclusions-$datetime.log58 scriptlog=$scriptlogpath/$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 62 63 63 64 # check if the script is already running 64 date > $lockpath/lock- doexclusions.txt >> $scriptlog 2>&165 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 65 66 checklock0=$? 66 67 case $checklock0 in 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> getting list for doexclusionsis running -> exit" >> $scriptlog 2>&170 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 81 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&184 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 85 date >> $scriptlog 2>&1 85 86 exit;; … … 91 92 echo "nothing to do -> exit" >> $scriptlog 2>&1 92 93 rm -v $todofile >> $scriptlog 2>&1 93 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 94 95 date >> $scriptlog 2>&1 95 96 exit … … 102 103 echo "do exclusions for date "$date >> $scriptlog 2>&1 103 104 year2=`echo $date | cut -c 1-4` 104 doexclusionspath=$logpath/ doexclusions/$year2105 doexclusionspath=$logpath/$program/$year2 105 106 makedir $doexclusionspath >> $scriptlog 2>&1 106 107 … … 109 110 case $check1 in 110 111 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 111 setstatuslogpath=$logpath/setstatus/doexclusions/$year2 112 makedir $setstatuslogpath >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-doexclusions-$date.log | grep int | sed -e 's/(int)//'` 115 116 case $check2 in 117 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;; 118 *) echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;; 119 esac 112 statustime="Now()" 113 failed="NULL" 114 starttime="NULL" 115 failedtime="NULL" 116 var1=$year2 117 var2=$date 118 setstatus 120 119 ;; 121 120 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; … … 124 123 125 124 rm -v $todofile >> $scriptlog 2>&1 126 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&1125 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 127 126 128 127 set +C
Note:
See TracChangeset
for help on using the changeset viewer.