Changeset 7460 for trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7265 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script launches the excluding of runs for all days for which 28 # this step is needed. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then the run are excluded for each date in the todolist using the 33 # macro doexclusions.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 46 55 scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m` 47 56 makedir $scriptlogpath 48 49 57 scriptlog=$scriptlogpath/doexclusions-$datetime.log 50 58 … … 53 61 makedir $getstatuslogpath >> $scriptlog 2>&1 54 62 63 # check if the script is already running 55 64 date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1 56 65 checklock0=$? … … 64 73 esac 65 74 66 75 # get the todo list 67 76 echo "getting list..." >> $scriptlog 2>&1 68 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 70 79 case $check0 in 71 80 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;; 72 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 81 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 73 86 esac 74 87 75 88 dates=(`cat $todofile`) 76 77 89 if [ "$dates" = "" ] 78 90 then … … 84 96 fi 85 97 98 # do exclusions for each date in the todo file 86 99 echo "dates: "${dates[@]} >> $scriptlog 2>&1 87 88 100 for date in ${dates[@]} 89 101 do
Note:
See TracChangeset
for help on using the changeset viewer.