Ignore:
Timestamp:
01/30/06 17:13:07 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=doexclusions
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    5051
    5152todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/doexclusions/$year
    53 getstatuslog=$getstatuslogpath/getstatus-doexclusions-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/doexclusions-$datetime.log
     58scriptlog=$scriptlogpath/$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6263
    6364# check if the script is already running
    64 date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     65date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6566checklock0=$?
    6667case $checklock0 in
    6768    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6869    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    69          echo "-> getting list for doexclusions is running -> exit" >> $scriptlog 2>&1
     70         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    7071         date  >> $scriptlog 2>&1
    7172         exit;;
     
    8182   *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    8283        rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     84        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8485        date  >> $scriptlog 2>&1
    8586        exit;;
     
    9192   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9293   rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     94   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9495   date  >> $scriptlog 2>&1
    9596   exit
     
    102103   echo "do exclusions for date "$date >> $scriptlog 2>&1
    103104   year2=`echo $date | cut -c 1-4`
    104    doexclusionspath=$logpath/doexclusions/$year2
     105   doexclusionspath=$logpath/$program/$year2
    105106   makedir $doexclusionspath >> $scriptlog 2>&1
    106107
     
    109110   case $check1 in
    110111      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
    120119        ;;
    121120      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     
    124123
    125124rm -v $todofile >> $scriptlog 2>&1
    126 rm -v $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1
     125rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    127126
    128127set +C
Note: See TracChangeset for help on using the changeset viewer.