- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
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 building of sequences 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 sequences are built for each date in the todolist using the 33 # macro buildsequenceentries.C 34 # If this was successful, the status is inserted into the database using 35 # the macro setstatus.C 27 36 # 28 37 … … 52 61 makedir $getstatuslogpath >> $scriptlog 2>&1 53 62 63 # check if script is already running 54 64 date > $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1 55 65 checklock0=$? … … 57 67 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 58 68 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 59 echo "-> getting list forbuildsequenceentries is running -> exit" >> $scriptlog 2>&169 echo "-> buildsequenceentries is running -> exit" >> $scriptlog 2>&1 60 70 date >> $scriptlog 2>&1 61 71 exit;; … … 63 73 esac 64 74 65 66 echo "getting list..." >> $scriptlog 2>&175 # get todo list 76 echo "getting todo list..." >> $scriptlog 2>&1 67 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'` 68 78 69 79 case $check0 in 70 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;; 71 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 80 1) echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $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-buildsequenceentries.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 72 86 esac 73 87 88 # retrieve dates from todofile 74 89 dates=(`cat $todofile`) 75 76 90 if [ "$dates" = "" ] 77 91 then … … 84 98 85 99 echo "dates: "${dates[@]} >> $scriptlog 2>&1 86 87 100 for date in ${dates[@]} 88 101 do … … 95 108 96 109 case $check1 in 97 1) echo "check1=$check1 -> everything ok -> setting status ..." >> $scriptlog 2>&1110 1) echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1 98 111 setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2 99 112 makedir $setstatuslogpath >> $scriptlog 2>&1 … … 102 115 case $check2 in 103 116 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;; 104 *) echo "check2=$check2 -> ERROR -> step could not be set " >> $scriptlog 2>&1;;117 *) echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;; 105 118 esac 106 119 ;; 107 *) echo "check1=$check1 -> ERROR - > step has to be repeated" >> $scriptlog 2>&1;;120 *) echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;; 108 121 esac 109 122 done
Note:
See TracChangeset
for help on using the changeset viewer.