#!/bin/sh
# Limit number of jobs - dirty for now
MAXRUNNING=27
. /export/osg/grid/setup.sh
RUNNING=`condor_q | grep -v RUN_TIME | grep 'R ' | wc -l`
QUEUED=`condor_q | grep -v RUN_TIME| grep 'I ' | wc -l`
export RUNNING
export QUEUED
export TIME=`date +%s`
export EST=0
# Limit number of jobs - dirty for now
if [ $RUNNING -gt $MAXRUNNING ];then
    QUEUED=999
fi

#echo $RUNNING $QUEUED $EST

#./classad.pm -a
#./LCGclassad.sh
./GCclassad.sh
