Check Crontab is Succesful or Not. [message #245742] |
Mon, 18 June 2007 12:41 |
Koolwant
Messages: 49 Registered: June 2007 Location: new jersey
|
Member |
|
|
Hey Masterminds
I want to know that how do u come to know that my CRON job was succesfully executed or not.
I mean if it is successful what would be the indications OR
If it is unsuccessful then how you come to know (other than checking alert log).
Is there any way i can automate any action if my job was sucessful or was not.
Regards
kool
|
|
|
Re: Check Crontab is Succesful or Not. [message #245749 is a reply to message #245742] |
Mon, 18 June 2007 12:58 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
You can configure your pager for that.
You can also use log files for that
small example
# Check if errors encountered, if yes send mail to DBA
#
if test `cat $werrfile | wc -l` -ge 1
then
print "$HOST $ORACLE_SID errors in listener log. Error: ` cat ${werrfile}`" > mail.txt
mail Dreamz.Dreamz+page@Dreaming.com < mail.txt
rm mail.txt
mailx -s "Oracle Error: $ORACLE_SID $HOST" $ESPDBA > /dev/null < $werrfile
continue
else
echo "Successful completion of routine checkup" >> $wlogfile
echo "No Errors / Alerts Encountered" >> $wlogfile
echo "**********************************************************************" >> $wlogfile
continue
[Updated on: Mon, 18 June 2007 12:58] Report message to a moderator
|
|
|
|
|
|