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

    r7471 r7476  
    4545table=SequenceProcessStatus
    4646column=fFillCallisto
    47 date=NULL
    48 datetime=`date +%F-%H-%M-%S`
    49 year=`date +%Y`
    5047
    5148todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/$program/$year
    53 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     49lockfile=$lockpath/lock-$program.txt
    5450
    5551scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5955date >> $scriptlog 2>&1
    6056
    61 makedir $getstatuslogpath >> $scriptlog 2>&1
    62 
    6357cd $mars
    6458
    6559# check if the script is already running
    66 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     60date > $lockfile >> $scriptlog 2>&1
    6761checklock0=$?
    6862case $checklock0 in
     
    7670
    7771# get todo file
    78 echo "getting list..." >> $scriptlog 2>&1
    79 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    80 
    81 case $check0 in
    82     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    83     *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    84          rm -v $todofile >> $scriptlog 2>&1
    85          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    86          date  >> $scriptlog 2>&1
    87          exit;;
    88 esac
     72getdolist  >> $scriptlog 2>&1
    8973
    9074sequences=(`cat $todofile`)
     
    9276then
    9377   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
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    142123done
    143124
    144 rm -v $todofile >> $scriptlog 2>&1
    145 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     125finish >> $scriptlog 2>&1
    146126
    147 set +C
    148 
    149 date  >> $scriptlog 2>&1
    150 
Note: See TracChangeset for help on using the changeset viewer.