06-22-2007
25,
0
Join Date: Jun 2007
Last Activity: 29 October 2009, 8:41 AM EDT
Posts: 25
Thanks Given: 0
Thanked 0 Times in 0 Posts
script
Hi
I have three sql commannds inside one file , I call this file through
cronjob , these jobs need to be run once the previous jobs completed.
for this
I need a shell scripts to check the first job is completed then
second job need to started
some this like this
the grep commend will grep my no of procees for this job
if it is less than one then my second job need to run
if it is greater than one need to wait until the job complete
-------------------------------
napTime=600 # seconds
while :
do
procFound=`ps -ef | grep /home/oracle|wc -l`
echo $procFound
if [[ $procFound < 1 ]] ;then
Sleep $napTime
#note well:
else
echo 'name'
sh /home/oracle/test;
fi
-----------------