Ignore:
Timestamp:
02/03/06 16:42:00 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7471 r7476  
    4444table=SequenceProcessStatus
    4545column=fFillStar
    46 date=NULL
    47 datetime=`date +%F-%H-%M-%S`
    48 year=`date +%Y`
    4946
    5047todofile=$listpath/ToDo-$table-$column.txt
    51 getstatuslogpath=$logpath/getstatus/$program/$year
    52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     48lockfile=$lockpath/lock-$program.txt
    5349
    5450scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5854date >> $scriptlog 2>&1
    5955
    60 makedir $getstatuslogpath >> $scriptlog 2>&1
    61 
    6256cd $mars
    6357
    6458# check if the script is already running
    65 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
     71getdolist  >> $scriptlog 2>&1
    7972
    80 case $check0 in
    81     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    82     *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    83          rm -v $todofile >> $scriptlog 2>&1
    84          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    85          date  >> $scriptlog 2>&1
    86          exit;;
    87 esac
    8873
    8974# retrieve sequences from todo file
     
    9277then
    9378   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     79   finish >> $scriptlog 2>&1
    9880fi
    9981
     
    128110done
    129111
    130 rm -v $todofile >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     112finish >> $scriptlog 2>&1
    132113
    133 set +C
    134 
    135 date  >> $scriptlog 2>&1
    136 
Note: See TracChangeset for help on using the changeset viewer.