Notify Me when job fail using cron


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Notify Me when job fail using cron
# 1  
Old 05-21-2008
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  
Old 05-21-2008
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  
Old 05-21-2008
Quote:
Originally Posted by unSpawn
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  
Old 05-21-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cron using shh keys fail

Hi All, Hoping someone can help with something I'm sure is an easy fix. I'm trying to setup a cron to ssh to a server and check if a process is running. I've got keys setup from the jumpbox which I'm originating the check from (I don't have root privileges), when running the check manually from... (3 Replies)
Discussion started by: mutley2202
3 Replies

2. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

4. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

5. UNIX for Advanced & Expert Users

cron job

Hello, Can anyone help me how to set any script as cron job. I have gone through all threads but not able to get the details. Appreciate your help. I need to set test.pl to run on every Tuesday by 6am in the morning. I do not the cron file which is defined. Please help me out. ... (3 Replies)
Discussion started by: jam_prasanna
3 Replies

6. Shell Programming and Scripting

notify-send does not notify real time

Hi, I am having a little trouble getting notify-send to work the way I would like it to. I am using ubuntu - karmic koala 2.6.31-19-generic #56-Ubuntu SMP So here's the problem run the following commands one after the other. notify-send -i info -t 100000 -- "Hi" "world" & notify-send -i... (3 Replies)
Discussion started by: linuxpenguin
3 Replies

7. AIX

Help with cron job

Hi guys and gals, I have this script that run perfectly when executed manually. If I place it in a cron to run on a schedule, it fails. Error is: exec(): 0509-036 Cannot load program /usr/local/bin/getlogical because of the following errors: 0509-150 Dependent module... (7 Replies)
Discussion started by: bbbngowc
7 Replies

8. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

9. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

10. UNIX for Advanced & Expert Users

cron fail to run

Hi, Does anyone know why the cron job fail to run automatically ? We have the problem with some Solaris 2.5.1 Machine ! The cron seemd to fail to submit the jobs defined at the defined time !! Why ? Sometime it runs OK,but sometime it fail . We are very sure the problem is due to... (6 Replies)
Discussion started by: kerwin_hsu
6 Replies
Login or Register to Ask a Question