[ale] crontab: script is hanging

Zyman, Andy zymana at hra.nyc.gov
Wed Jul 24 09:59:18 EDT 2002


Morning gentlemen,
the following script is hanging then I'm running it from cron.
The weird part - it executes all statements without any problems. I can see
"DONE" in the log file. but somehow it is not exiting - i can see that i
still have this process....
I tested it from "unix prompt" it is working without any problems.
crontab -l:
59 20 * * 1-5 /oracle/work/bin/bounce.sh stop rivr | tee
/oracle/work/bin/log/bounce_stop_rivr.log
00 01 * * 2-6 /oracle/work/bin/bounce.sh start rivr | tee
/oracle/work/bin/log/bounce_start_rivr.log

ls -l /oracle/work/bin/log/bounce_* 

-rw-r--r--   1 oraowner dba         2076 Jul 24 01:00
/oracle/work/bin/log/bounce_start_rivr.log
-rw-r--r--   1 oraowner dba          705 Jul 23 21:00
/oracle/work/bin/log/bounce_stop_rivr.log

more /oracle/work/bin/log/bounce_start_rivr.log //last 10 lines:
$ tail -10 /oracle/work/bin/log/bounce_start_rivr.log
Total System Global Area                        679362064 bytes
Fixed Size                                          48656 bytes
Variable Size                                   183681024 bytes
Database Buffers                                491520000 bytes
Redo Buffers                                      4112384 bytes
Database mounted.
Database opened.
SVRMGR> SVRMGR> 
Server Manager complete.
                                              DONE 
$

here is last part of the script:

----------------begin -----------------------
svrmgrl << EOF
connect internal
$DO

EOF

if [ "$STATUS" -eq "`ps -ef | grep pmon | grep -c $ORACLE_SID `" ]; then
                      echo " \n There are problems during executing svrmgrl"
                      echo " Sending email notification to DBA"
                      mailx -s "[ ${0##*/} ] Check status of $ORACLE_SID on
`hostname`" $DBA << EOF
                 Please check log file for script $0 on `hostname`
EOF
                      echo " Terminating"
                      exit 1

fi

echo "                                              DONE "


#DONE
---------------- end ------------------------

interesting part that it's not hanging when i'm passing "stop" (then
$DO=shutdown ). Another thing - maybe it removes (?) the hanging "bounce.sh
stop" process and because this is happening in the night i can't see that
"stop" was hanging also?
Please advise.

Thank You
 Andy

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list