Ignore:
Timestamp:
01/10/06 22:12:58 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/doexclusions

    r7265 r7460  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2004
     22#   Copyright: MAGIC Software Development, 2000-2006
    2323#
    2424#
    2525# ========================================================================
    2626#
     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
    2736#
    2837
     
    4655scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m`
    4756makedir $scriptlogpath
    48 
    4957scriptlog=$scriptlogpath/doexclusions-$datetime.log
    5058
     
    5361makedir $getstatuslogpath >> $scriptlog 2>&1
    5462
     63# check if the script is already running
    5564date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
    5665checklock0=$?
     
    6473esac
    6574
    66 
     75# get the todo list
    6776echo "getting list..." >> $scriptlog 2>&1
    6877check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
     
    7079case $check0 in
    7180   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;;
    7386esac
    7487
    7588dates=(`cat $todofile`)
    76 
    7789if [ "$dates" = "" ]
    7890then
     
    8496fi
    8597
     98# do exclusions for each date in the todo file
    8699echo "dates: "${dates[@]} >> $scriptlog 2>&1
    87 
    88100for date in ${dates[@]}
    89101do
Note: See TracChangeset for help on using the changeset viewer.