Changeset 7460 for trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
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 checking of the availability of the files for 28 # the datasets. 29 # 30 # After checking, if the script is already running, the todolist is 31 # written by using the macro getdolist.C 32 # Then for each dataset the sequences are extracted from the datasetfile 33 # and for each sequence the availability of the star files checked by using 34 # the macro checkstardone.C 35 # If this was successful, the status is inserted into the database using 36 # the macro setstatus.C 27 37 # 28 38 … … 42 52 scriptlogpath=$logpath/run/checkstardone/`date +%Y/%m/%d` 43 53 makedir $scriptlogpath 44 45 54 scriptlog=$scriptlogpath/checkstardone-$datetime.log 46 55 … … 51 60 cd $mars 52 61 62 # check if script is already running 63 date > $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 64 checklock0=$? 65 case $checklock0 in 66 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkstardone is running -> exit" >> $scriptlog 2>&1 69 date >> $scriptlog 2>&1 70 exit;; 71 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 72 esac 53 73 54 if [ -e $todofile ] 55 then 56 echo "checkstardone is already running -> exit" >> $scriptlog 2>&1 57 exit 58 fi 59 74 # get todo list 60 75 echo "getting list..." >> $scriptlog 2>&1 61 76 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` … … 63 78 case $check0 in 64 79 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 65 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; 80 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 81 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 83 date >> $scriptlog 2>&1 84 exit;; 66 85 esac 67 86 68 87 datasets=(`cat $todofile`) 69 70 88 if [ "$datasets" = "" ] 71 89 then 72 90 echo "nothing to do -> exit" >> $scriptlog 2>&1 73 91 rm -v $todofile >> $scriptlog 2>&1 74 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&192 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 75 93 date >> $scriptlog 2>&1 76 94 exit … … 78 96 79 97 echo "datasets: "${datasets[@]} #>> $scriptlog 2>&1 80 81 98 for dataset in ${datasets[@]} 82 99 do … … 123 140 124 141 rm -v $todofile >> $scriptlog 2>&1 125 rm -v $lockpath/lock- $table-$column.txt >> $scriptlog 2>&1142 rm -v $lockpath/lock-checkstardone.txt >> $scriptlog 2>&1 126 143 127 144 date >> $scriptlog 2>&1
Note:
See TracChangeset
for help on using the changeset viewer.