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

    r7471 r7476  
    4343table=DataSetProcessStatus
    4444column=fStarFilesAvail
    45 date=NULL
    46 datetime=`date +%F-%H-%M-%S`
    47 year=`date +%Y`
    4845
    4946todofile=$listpath/ToDo-$table-$column.txt
    50 getstatuslogpath=$logpath/getstatus/$program/$year
    51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
     47lockfile=$lockpath/lock-$program.txt
    5248
    5349scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5753date >> $scriptlog 2>&1
    5854
    59 makedir $getstatuslogpath >> $scriptlog 2>&1
    60 
    6155cd $mars
    6256
    6357# check if script is already running
    64 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     58date > $lockfile >> $scriptlog 2>&1
    6559checklock0=$?
    6660case $checklock0 in
     
    7468
    7569# get todo list
    76 echo "getting list..." >> $scriptlog 2>&1
    77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    78 
    79 case $check0 in
    80    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;;
    81    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    82         rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    84         date  >> $scriptlog 2>&1
    85         exit;;
    86 esac
     70getdolist  >> $scriptlog 2>&1
    8771
    8872datasets=(`cat $todofile`)
     
    9074then
    9175   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    92    rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    94    date  >> $scriptlog 2>&1
    95    exit
     76   finish >> $scriptlog 2>&1
    9677fi
    9778
     
    142123done
    143124
    144 rm -v $todofile  >> $scriptlog 2>&1
    145 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     125finish >> $scriptlog 2>&1
    146126
    147 date  >> $scriptlog 2>&1
    148 
Note: See TracChangeset for help on using the changeset viewer.