The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
nagios-notify 0.10 (Default branch) iBot Software Releases - RSS News 0 04-08-2008 12:50 PM
How the first script should notify in case there is no response from second rajusa10 Shell Programming and Scripting 4 03-19-2008 01:35 PM
Notify Command. venkyA UNIX for Dummies Questions & Answers 2 08-21-2007 06:20 AM
Notify of a new thread linuxpenguin Post Here to Contact Site Administrators and Moderators 5 11-21-2003 08:45 PM
cron fail to run kerwin_hsu UNIX for Advanced & Expert Users 6 03-11-2002 01:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-21-2008
ejaggers ejaggers is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 5
Notify Me when job fail using cron

I would like to be notified when an Informix dbexport job fails on a TRU64 system.
My idea is to send an email via telnet, but can only get telnet to do it interactively.
I can do the following steps on my UNIX box interactively, but cannot send an email with a script. Can someone help? Is there a better way to do this?

I tried the following which only works interactively:

telnet xx.yy.zz.ww 25
helo
mail from: 123@123.com
rcpt to: my@email.net
data
subject: email test
The dog
is in the house
.
quit
  #2 (permalink)  
Old 05-21-2008
unSpawn unSpawn is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 50
If the job fails does it get logged somewhere? If so, wouldn't it be easier to run a logwatcher, add a condition and trigger it to send an e-mail?
  #3 (permalink)  
Old 05-21-2008
ejaggers ejaggers is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 5
Quote:
Originally Posted by unSpawn View Post
If the job fails does it get logged somewhere? If so, wouldn't it be easier to run a logwatcher, add a condition and trigger it to send an e-mail?
dbexport creates a huge log file called dbexport.out, and at the end it has "dbexport complete", if all is well. I don't know anthing about logwatcher, nor how to send email from unix TRU64.
  #4 (permalink)  
Old 05-21-2008
rajus19 rajus19 is offline
Registered User
  
 

Join Date: Feb 2005
Location: Bangalore
Posts: 36
You can do it but its completely dependent on how you run the Informix dbexport job.

If you run the job by running a command you can write a small script and call your job from there and depending on the return code of your job you can either send an email or just ignore it.

If you run the job through a scheduling tool (like Control-M) then you can set the e-mail option on the tool itself.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0