I have a script that looks something like this:
It works fine except that I have cron running it every 15 minutes and when my condition is met I get 4 pages. Can someone please tell me how I can have cron run it every 15 minutes and get only one page???? Thank You
## This portion of the script monitors power to SP nodes
##
spmon -d|awk '{print $2":"$4}' > /tmp/mon_power.out
grep off /tmp/mon_power.out > /tmp/mon_power2.out
if [ $? -eq 0 ]
then mail -s "SP node power out msg" icu812@archwireless.net < /tmp/mon_sp_powe
r2.out
mail -s "SP node power out msg" icu812@archwireless.net < /tmp/mon_sp_power2.ou
t
fi
It works fine except that I have cron running it every 15 minutes and when my condition is met I get 4 pages. Can someone please tell me how I can have cron run it every 15 minutes and get only one page???? Thank You
## This portion of the script monitors power to SP nodes
##
spmon -d|awk '{print $2":"$4}' > /tmp/mon_power.out
grep off /tmp/mon_power.out > /tmp/mon_power2.out
if [ $? -eq 0 ]
then mail -s "SP node power out msg" icu812@archwireless.net < /tmp/mon_sp_powe
r2.out
mail -s "SP node power out msg" icu812@archwireless.net < /tmp/mon_sp_power2.ou
t
fi