Test job to make sure pwctest service is up
Test script which can run every 30 mins to make sure pwctest is available.
a) If Error , script should send email to Tech.
plz help me out for this script
i'm waiting for reply.....plz
Test job to make sure pwctest service is up
Test script which can run every 30 mins to make sure pwctest is available.
a) If Error , script should send email to Tech.
plz help me out for this script
i'm waiting for reply.....plz
What have you tried so far? Show an excerpt of your script using code tags, thanks. You can use cron to trigger it every 30 minutes.
Im totally new to this system so i don't know how to write it if possible can u plz post the example for that script?
No, why don't you try it and we help you to correct errors?
I tried like following way
30 * * * * ./pwctest
i know this much after that....how to keep in if loop if i get error means how to send a mail??
plz give me proper code or guide me i try my slef...
... is not a good idea, since a) you do use a relative path (use absolute paths, as the cronjob does not use your environment) and b) you don't redirect any errors etc. to a logfile (if not inside the script).
Check out this guide on cron jobs:
Senior Advisor - http://www.unix.com
The forum has a search function. There will be plenty of examples if you search the "Shell Programming and Scripting" area for the string "send mail".
Or check out this, for mails:
Senior Advisor - http://www.unix.com
Hi Ksrivani:
is that you want?
while ps | grep "pwctest" > /dev/null
do
sleep 30m
done
echo "The pwctest was quitted" | mail Tech
No EDward114..........
actually pwctest is a program like thread if we run that program is running fine means the service is available for every 30mints.if not it has to show in log file and that error msg should mail to tech group..
I hope that U understand the program...if possible plz give me reply.