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

    r7471 r7476  
    3737
    3838user=`whoami`
    39 program=checkfileavail
     39program=checkfilesavail
    4040source /home/$user/Mars/datacenter/scripts/sourcefile
    4141
    4242table=SequenceProcessStatus
    4343column=fAllFilesAvail
    44 date=NULL
    45 datetime=`date +%F-%H-%M-%S`
    46 year=`date +%Y`
    4744
    4845todofile=$listpath/ToDo-$table-$column.txt
    49 getstatuslogpath=$logpath/getstatus/$program/$year
    50 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
     46lockfile=$lockpath/lock-$program.txt
    5147
    52 scriptlogpath=$logpath/run/checkfilesavail/`date +%Y/%m/%d`
     48scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5349makedir $scriptlogpath
    54 
    55 scriptlog=$scriptlogpath/checkfilesforsequenceavail-$datetime.log
     50scriptlog=$scriptlogpath/$program-$datetime.log
    5651
    5752date >> $scriptlog 2>&1
    58 
    59 makedir $getstatuslogpath >> $scriptlog 2>&1
    6053
    6154cd $mars
    6255
    6356# check if script is already running
    64 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     57date > $lockfile >> $scriptlog 2>&1
    6558checklock0=$?
    6659case $checklock0 in
     
    7467
    7568# 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 -> step has to be repeated" >> $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
     69getdolist  >> $scriptlog 2>&1
    8770
    8871# retrieve sequences from todofile
     
    9174then
    9275   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    93    rm -v $todofile >> $scriptlog 2>&1
    94    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    95    date  >> $scriptlog 2>&1
    96    exit
     76   finish >> $scriptlog 2>&1
    9777fi
    9878
     
    10585   var1=$no
    10686   var2=$no2
    107    outpath=$logpath/$program/$no
    108    echo "outpath: "$outpath  >> $scriptlog 2>&1
     87   checkfileavailpath=$logpath/$program/$no
    10988   makedir $outpath  >> $scriptlog 2>&1
     89   checkfileavaillog=$checkfileavailpath/$program-$sequence.log
    11090   
    11191   sequencefile=$sequpath/$no/sequence$no2.txt
     
    11494   setstatus "start" >> $scriptlog 2>&1
    11595
    116    check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
     96   check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $checkfileavaillog | grep int | sed -e 's/(int)//'`
    11797
    11898   case $check1 in
     
    128108done
    129109
    130 rm -v $todofile  >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     110finish >> $scriptlog 2>&1
    132111
    133 date  >> $scriptlog 2>&1
    134 
Note: See TracChangeset for help on using the changeset viewer.