Changeset 15596 for trunk


Ignore:
Timestamp:
05/13/13 10:50:59 (12 years ago)
Author:
Daniela Dorner
Message:
allow more than one instance of script and moved control of number of instances from cron to script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Transfer/BackupRawToWue.sh

    r13152 r15596  
    99set -C
    1010
     11# checking that not more than $numrsyncwuelimit
     12#  instances of the script are running
     13numrsyncwue=`lsof $0 | grep -o -c $0`
     14echo "-"$numrsyncwue"-"
     15if [ $numrsyncwue -gt $numrsyncwuelimit ]
     16then
     17   echo "INFO already "$numrsyncwue" BackupRawToWue.sh running -> exit. "
     18   finish
     19fi
     20
    1121logfile=$runlogpath"/RsyncRawToWue-"$datetime".log"
    1222date >> $logfile
    13 
    14 # check if script is already running
    15 lockfile=$lockpath/lock-$program.txt
    16 checklock
    1723
    1824# get todo list
     
    2733   
    2834   setstatus "start"
     35   if [ $numchanged -eq 0 ]
     36   then
     37      printprocesslog "INFO "$numchanged" rows were changed in DB => "$night"_"$runid" is already processed => continue."
     38      continue
     39   fi
    2940
    3041   rawdirisdc="/scratch/from_lapalma/raw"
Note: See TracChangeset for help on using the changeset viewer.