Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Cron and disabling emails for one script only
Date: Tue, 06 Apr 2021 19:42:39
Message-Id: 70fb4ca7-ca39-9454-6c58-f6a352fe8373@gmail.com
In Reply to: Re: [gentoo-user] Cron and disabling emails for one script only by Neil Bothwick
1 Neil Bothwick wrote:
2 > On Tue, 6 Apr 2021 12:43:31 -0500, Dale wrote:
3 >
4 >> Keep in mind, I do not want to disable ALL emails, just this one
5 >> script.  How does one disable emails for this one cron job?  Do I have a
6 >> typo or putting it in wrong place maybe?  Everything I found shows this
7 >> should work but obviously I'm doing something wrong.  Again, error
8 >> emails are fine.  I don't want successful runs tho. 
9 > cron only sends an email if the job produces any output. If the script
10 > follows the *nix principle of succeed quietly, fail noisily, you should
11 > only get emails when things go wrong. However without seeing your
12 > mail-backup script, it is hard to say what needs to change.
13 >
14 > The "|| true " part means this cron task will always return success, even
15 > if the script fails, which possibly is not what you want.
16 >
17 >
18
19
20 My script, if one wants to call it that, just has rsync commands in it. 
21 It doesn't get fancy.  I literally copy the commands from Konsole and
22 paste them in my text file.  I make it executable and that's my script. 
23 I wouldn't even think it rises to a bash thing even tho it is at the
24 top, cron likes it that way.  For years, I been doing it manually.  I
25 just wanted to automate the thing a bit. 
26
27 I hope I don't have to learn bash to do this.  I'd delete the cron job
28 and just go back to doing it manually.  lol 
29
30 Dale
31
32 :-)  :-) 

Replies

Subject Author
Re: [gentoo-user] Cron and disabling emails for one script only Neil Bothwick <neil@××××××××××.uk>