|
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 ECCCustomReportsWrapper.tcl" | wc -l`
my_process=`expr $my_process - 1`
number_of_parallel_processes=3
number_of_processes_to_start=5
number_of_high_prio_processes=1
processes_remaining=`expr $number_of_parallel_processes - $my_process`
count=0
if [ $my_process -le $number_of_parallel_processes ]
then
if [ $processes_remaining -le $number_of_high_prio_processes ]
then
echo "Going to start a High Priority Thread"
while [ $count -lt $number_of_processes_to_start ]
do
echo "Starting a new High priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReportsWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`expr $my_process + 1`;
count=`expr $count + 1`
done
else
echo "Going to start a Low Priority Thread"
while [ $count -lt $number_of_processes_to_start ]
do
echo "Starting a new low priority process >>> "
$MQL_PATH -t -b $BOOT_FILE -c 'exec prog ECCCustomReportsWrapper.tcl /apps/NPICOEApps_dev/www/devmwsr3/EC_Report/'
my_process=`expr $my_process + 1`;
count=`expr $count + 1`
done
fi
fi
Appreciate your help!!!!!!!!!!!
|