Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:03

0001 #!/bin/sh
0002 
0003 #Autor subir.sarkar@cern.ch
0004 
0005 set -o nounset
0006 
0007 echo "====> Starting CondDB(Quality) cron job at $(date)<===="
0008 
0009 DEBUG=1
0010 PROGNAME=/home/cmstacuser/CMSSWReleasesForCondDB/CMSSW_2_1_12/src/RunCondDBOffline21X_QualityOnly.sh  
0011 #PROGNAME=/bin/ls  
0012 COMMAND=cmsRun
0013 let "count = $(ps --no-headers -l -C $COMMAND | wc -l)"
0014 if [ "$count" -gt 0 ]; then
0015  cmdrunning=$(ps --no-headers -C $COMMAND -o cmd)
0016  if echo $cmdrunning | grep "log21X/MainCfg" > /dev/null
0017  then
0018    if [ $DEBUG -gt 0 ]; then
0019      echo Time: $(date '+%D-%T') Caller: $(basename $0) - $COMMAND already running ...
0020      ps --columns 180 --no-headers -fl -C $COMMAND | grep "log21X/Main"
0021    fi
0022    echo "====> EXIT <===="
0023    exit 1
0024  fi
0025 fi
0026 
0027 $PROGNAME
0028 status=$?
0029 echo -- Finished at $(date) with status=$status --
0030 exit $status
0031 echo ----