Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cron launched script

Status
Not open for further replies.

icu812

MIS
Sep 10, 2001
52
0
0
US
I have a korn shell script that is launched by cron every 5 minutes. This script is checking ORACLE processes to make sure that they are up and running. When it finds one that is down, I am paged every 5 minutes until I can fix the condition that causing me to get paged. Can someone please give me some tips on how I would set up this script to run every 5 minutes from cron but page me only once an hour. Thanks
 
You could set a 'flag file' to decide whether you should be paged

e.g

Oracle process failed
If 'paged' file does not exist
send pager message
touch 'paged' file
else do nothing

First time around there is no 'paged' file so the script pages you and creates the file.

Second time around nothing happens

when your problem is fixed, you could delete the 'paged' file manually or further extend the script

e.g

if oracle process are ok
remove 'paged' file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top