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

Legend:

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

    r7474 r7477  
    4949table=SequenceProcessStatus
    5050column=fCallisto
    51 date=NULL
    52 datetime=`date +%F-%H-%M-%S`
    53 year=`date +%Y`
    5451#pno=500 # number of processes, i.e. number of todo-files
    5552
    5653todofile=$listpath/ToDo-$table-$column
    57 getstatuslogpath=$logpath/getstatus/$program/$year
    58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     54lockfile=$lockpath/lock-getting-$program-list.txt
    5955
    6056scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    6460date >> $scriptlog 2>&1
    6561
    66 makedir $getstatuslogpath >> $scriptlog 2>&1
    67 
    6862cd $mars
     63
     64# check if getting of list is already running
     65date > $lockfile >> $scriptlog 2>&1
     66checklock0=$?
     67case $checklock0 in
     68    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
     69    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
     70         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
     71         date  >> $scriptlog 2>&1
     72         exit;;
     73    *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
     74esac
    6975
    7076# get todo file
     
    7581   echo " -> choose one file and start calibrating" >> $scriptlog 2>&1
    7682else
    77    date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    78    checklock0=$?
    79    case $checklock0 in
    80        0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    81        1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    82             echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    83             date  >> $scriptlog 2>&1
    84             exit;;
    85        *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
    86    esac
    87 
    88    echo "getting list..." >> $scriptlog 2>&1
    89    check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    90 
    91    case $check0 in
    92       1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    93       *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    94            rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    95            date  >> $scriptlog 2>&1
    96            exit;;
    97    esac
    98    rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
     83   # get todo list
     84   getdolist  >> $scriptlog 2>&1
     85   rm -v $lockfile >> $scriptlog 2>&1
    9986fi
    10087
     
    135122then
    136123   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    137    rm -v $todofile >> $scriptlog 2>&1
    138    rm -v $lockfile >> $scriptlog 2>&1
    139    date  >> $scriptlog 2>&1
    140    exit
     124   finish >> $scriptlog 2>&1
    141125fi
    142126
     
    272256done
    273257
    274 rm -v $todofile >> $scriptlog 2>&1
    275 rm -v $lockfile >> $scriptlog 2>&1
    276 
    277 set +C
    278 
    279 date  >> $scriptlog 2>&1
    280 
     258finish >> $scriptlog 2>&1
     259
Note: See TracChangeset for help on using the changeset viewer.