LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-26-2006, 09:07 AM   #1
salmanucit
Member
 
Registered: Jul 2004
Posts: 56

Rep: Reputation: 15
Email


hi
i have set a jop on linux using crontab.
i want an email to be sent to my email address (through exchagne server running in my office) to me after job is completed
kindly tell me how to set this
Regards
 
Old 02-27-2006, 02:09 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
You can use the command-line mail command. For example:


30 13 * * * /usr/local/bin/somescript &>/var/log/some.log ; /bin/cat /var/log/some.log | /bin/mail -s "somescript status" user@domain.com &>/dev/null

The above cron entry will run '/usr/local/bin/somescript', capturing its output in '/var/log/some.log'. On completion of the script, '/var/log/some.log' will be emailed to 'user@domain.com', with the subject 'somescript status'.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What email program can work with email header on pop3 server TruongAn Linux - Software 0 01-13-2005 11:48 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 04:43 AM
How to Import Microsft outlook Email in any Red hat 9 Email mobassir Linux - Software 2 07-28-2003 10:42 AM
How to Import Microsft outlook Email in any Red hat 9 Email Software mobassir Linux - Software 0 07-26-2003 04:08 AM
How do I: convert my fetchmail email file to separate email files? ancientt Linux - Software 1 02-03-2003 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration