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/buildsequenceentries

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=buildsequenceentries
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    5051
    5152todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/buildsequenceentries/$year
    53 getstatuslog=$getstatuslogpath/getstatus-buildsequenceentries-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/buildsequenceentries/`date +%Y/%m`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/buildsequenceentries-$datetime.log
     58scriptlog=$scriptlogpath/$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6263
    6364# check if script is already running
    64 date > $lockpath/lock-buildsequenceentries.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 "-> buildsequenceentries is running -> exit" >> $scriptlog 2>&1
     70         echo "-> $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-buildsequenceentries.txt >> $scriptlog 2>&1
     84        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8485        date  >> $scriptlog 2>&1
    8586        exit;;
     
    9293   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9394   rm -v $todofile >> $scriptlog 2>&1
    94    rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     95   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9596   date  >> $scriptlog 2>&1
    9697   exit
     
    102103   echo "building sequence entries for date $date..." >> $scriptlog 2>&1
    103104   year2=`echo $date | cut -c 1-4`
    104    buildsequentriespath=$logpath/buildsequenceentries/$year2
     105   buildsequentriespath=$logpath/$program/$year2
    105106   makedir  $buildsequentriespath >> $scriptlog 2>&1
    106107
     
    109110   case $check1 in
    110111      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1
    111            setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2
    112            makedir $setstatuslogpath >> $scriptlog 2>&1
    113 
    114            check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
    115            case $check2 in
    116               1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    117               *)   echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;;
    118            esac
     112           statustime="Now()"
     113           failed="NULL"
     114           starttime="NULL"
     115           failedtime="NULL"
     116           var1=$year2
     117           var2=$date
     118           setstatus
    119119           ;;
    120       *)   echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
     120      *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
    121121   esac
    122122done
    123123
    124124rm -v $todofile >> $scriptlog 2>&1
    125 rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     125rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    126126
    127127set +C
Note: See TracChangeset for help on using the changeset viewer.