public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Cron and disabling emails for one script only
Date: Wed, 7 Apr 2021 10:47:11 -0500	[thread overview]
Message-ID: <c81261fc-c663-f5e9-7870-ce1ceaef9776@gmail.com> (raw)
In-Reply-To: <20210407152611.22b7bb90@digimed.co.uk>

Neil Bothwick wrote:
> On Wed, 7 Apr 2021 03:22:18 -0500, Dale wrote:
>
>>>> This seems to be working.  Since I added the null bit to the script
>>>> itself, it hasn't sent a email.  I don't know if it will if it fails
>>>> but I still have weekly backups as well.   
>>> If you only redirect stdout to /dev/null and leave stderr alone, you
>>> should still see errors. But a better option would be to have your
>>> script only send output when something goes wrong.
>> That sounds complicated.  I've never been good at what y'all call
>> scripting.  I'm just glad it does it for me so I don't forget. 
> Not really. ">/dev/null" redirects stdout to null. You added 2>&1, which
> redirects stderr to stdout, effectively throwing away any error messages.
> Post your backup script and we'll be able to help more.
>
>

I left the last bit off as well.  I just put in the null part.  I may do
something to force it to screw up, like umount the drive, and see what
it does.  To be honest tho, I just wanted the emails to stop for that
script.  I have other backups anyway, just not as frequent. 

Dale

:-)  :_) 


      reply	other threads:[~2021-04-07 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 17:43 [gentoo-user] Cron and disabling emails for one script only Dale
2021-04-06 18:24 ` antlists
2021-04-06 18:43 ` Neil Bothwick
2021-04-06 19:42   ` Dale
2021-04-06 20:28     ` Neil Bothwick
2021-04-06 19:58 ` John Covici
2021-04-06 23:51   ` Dale
2021-04-07  7:32     ` Neil Bothwick
2021-04-07  8:22       ` Dale
2021-04-07 14:26         ` Neil Bothwick
2021-04-07 15:47           ` Dale [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c81261fc-c663-f5e9-7870-ce1ceaef9776@gmail.com \
    --to=rdalek1967@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox