LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2015, 08:24 PM   #1
lq_win
Member
 
Registered: Jul 2015
Posts: 65

Rep: Reputation: Disabled
Question how to send email after the cron job ran completely


Hello All,

I have a cron job below:

#every 30 minutes
15,30,45,59 7-21 * * * sh /home/guest/Rsync/doRsync

how to send email after the it ran completely? (my mail server is not in the same box).

please help

thank a lot in advance.

Regards
Win
 
Old 07-06-2015, 08:32 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
That looks more like every 15 minutes

Why not put something like mail -s "$(date): doRsync done" Win@mailserver.my.domain.org in the shell script?
 
  


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
cron job running but not getting the email that should send linuxandtsm Linux - Newbie 14 07-19-2011 05:41 PM
how to make root cron job to send email if there is output mirror51 Linux - Newbie 3 08-12-2009 01:01 AM
usin AWK in cron job to send dynamic ip via email digihlp Programming 2 12-10-2003 08:10 AM
Cron job , send email mikeshn Linux - General 1 09-21-2003 09:02 AM
Send Email + Txt Attachment Using Cron Job beringer Linux - Newbie 3 01-31-2003 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 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