Wants alternate to the Sleep option??

Actually the main script which i posted yesterday is saimptlogi_batch.sh and i am submitting this script in a job scheduler call "AppWorx" ....What this script does is it consume some file called RTLOG* in the $MMPOS directory.After consuming it will rename the file with .1 extension..Each file consumption takes atleast 2:30 to 3:mins...so when I am submitting this script which is named as saimptlogi_batch in appworx,it is starting another sub module call saimptlogi which is for an individual RTLOG file...Once one saimptlogi finishes another saimptlogi is starting...like this it will run one after another till the number of files present in rtlogfiles.txt.....and till all the files will not be consumed the main batch saimptlogi_batch should be running......when I am submitting the main batch saimptlogi_batch,it is starting the sub modules called saimptlogi but it itself is getting finished in few seconds....I want the main batch to run till the last RTLOG consumption...

#!/bin/ksh
PROG="'`echo $1`'"
sqlplus -silent $db_login/$db_password@rms <<EOF
variable p_prog varchar2
execute mg_refresh($PROG);
exit;
EOF

it is the most recently modified entry in this directory?
Though I know the logfile name...it will recent day name and it looks like below:

-rw-rw-rw- 1 appworx dba 1024 Mar 4 10:03 Mar_04.log

Only this log files will be there in this directory and ls -ltr|tail -1 will get me the last modified file..