1834911 Members
3034 Online
110071 Solutions
New Discussion

Email notification

 
Babukanthan
Advisor

Email notification

Hi All,

How should i receive email notification saying that a job process is succesfully completed. is there any HP-UX commands availble to check that.

Babukanthan
4 REPLIES 4
Jonathan Fife
Honored Contributor

Re: Email notification

If the job uses return codes to indicate success, just test the $? variable. Example:

if [ $? -eq 0 ]; then
mailx -s "job finished successfully" your.email@company.com
fi

As to how you should receive it -- receive it happily, since your job worked!
Decay is inherent in all compounded things. Strive on with diligence
inventsekar_1
Respected Contributor

Re: Email notification

yes. available. do a little search in ITRC forums with the string email and u will get more information.

u have assigned no points to ur responses.
assigning points will give you good responses.
Be Tomorrow, Today.
spex
Honored Contributor

Re: Email notification

[ $? -eq 0 ] && echo Job finished successfully at $(date). | mailx -m -s "Job Successful" your@email.addr || echo Job failed at $(date)! | mailx -m -s "Job Failed!" your@email.addr
Babukanthan
Advisor

Re: Email notification

It was very useful and i tested. working fine.