I have one script for running report. But it is currently taking only 5 instances and running the script. If at all there is 6th one waiting for running, the script is not picking up the 6th report. Below is the code. Please help me in fixing this!!!!
my_process=`/usr/ucb/ps laxwwww | grep "exec prog ECCCustomReport sWrapper.tcl" | wc -l`
my_process=`exp r $my_process - 1`
number_of_paral lel_processes=3
number_of_proce sses_to_start=5
number_of_high_ prio_processes= 1
processes_remai ning=`expr $number_of_para llel_processes - $my_process`
count=0
if [ $my_process -le $number_of_para llel_processes ]
then
if [ $processes_rema ining -le $number_of_high _prio_processes ]
then
echo "Going to start a High Priority Thread"
while [ $count -lt $number_of_proc esses_to_start ]
do
echo "Starting a new High priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReport sWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`exp r $my_process + 1`;
count=`expr $count + 1`
done
else
echo "Going to start a Low Priority Thread"
while [ $count -lt $number_of_proc esses_to_start ]
do
echo "Starting a new low priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReport sWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`exp r $my_process + 1`;
count=`expr $count + 1`
done
fi
fi
Appreciate your help!!!!!!!!!!!
my_process=`/usr/ucb/ps laxwwww | grep "exec prog ECCCustomReport sWrapper.tcl" | wc -l`
my_process=`exp r $my_process - 1`
number_of_paral lel_processes=3
number_of_proce sses_to_start=5
number_of_high_ prio_processes= 1
processes_remai ning=`expr $number_of_para llel_processes - $my_process`
count=0
if [ $my_process -le $number_of_para llel_processes ]
then
if [ $processes_rema ining -le $number_of_high _prio_processes ]
then
echo "Going to start a High Priority Thread"
while [ $count -lt $number_of_proc esses_to_start ]
do
echo "Starting a new High priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReport sWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`exp r $my_process + 1`;
count=`expr $count + 1`
done
else
echo "Going to start a Low Priority Thread"
while [ $count -lt $number_of_proc esses_to_start ]
do
echo "Starting a new low priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReport sWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`exp r $my_process + 1`;
count=`expr $count + 1`
done
fi
fi
Appreciate your help!!!!!!!!!!!
Comment