The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

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 08-05-2008
elavv elavv is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 5
ftp + pop up messge

Hi ,

Please give your valuable suggestion for my following query.

I need to generate a pop up message when a cronjob fails. The cron job is in the load server and I need to show the pop up message in another web server. That is the output file(a.out) of the cron job file needs to be transferred from the load server to the web server . Then I need to create a new cgi file(popup.cgi) in the web server which reads the output file(a.out) and generate the pop up message in two pages (index.cgi and messages.cgi) which are in the web server.
In case of failure, it should show a pop up message as FAILURE. This message should be hidden when the out put file (a.out) is holding the word success.

Please let me know if u need more clarification on this and share ur opinion about this logic.If u have any other smarter way, Please yours is mostly welcome.

Thanks and Regards,
E.Ela
  #2 (permalink)  
Old 08-05-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
well.....
if i got your post right, you want to know when to transfer a file generated in one server, to other.

just make the cron script better so it will know that it failed, ad send a file with a report (using ftp or scp) to the diplay server

or install The Hobbit Monitor
and create a custom script in the load server
  #3 (permalink)  
Old 08-05-2008
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
You can use wall command.
I am not sure how to use it but it uses to prompt all logged in users with message.

- nilesh
  #4 (permalink)  
Old 08-06-2008
elavv elavv is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 5
Hi..thanks for ur reply ..I need to display a pop up messge in a browser when the cron job fails....
So shell i use any command to assist this task???

Thanks and Regards,
E.Ela
success250=`grep -c 250.Transfer.completed.successfully /tmp/int002_$$`
mail_list="elavv2003@gmail.com"
if [ "$success250" -eq 1 ]
then
cat $1 /tmp/ela01_$$ > /tmp/ela01err.$$

mutt $mail_list -s "Success "`basename $0` -i "/tmp/ela01err.$$" </dev/null
else
mutt $mail_list -s "FAILURE "`basename $0` -i "/tmp/ela01err.$$" </dev/null
fi
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 07:58 AM.


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