public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Cron and disabling emails for one script only
Date: Tue, 6 Apr 2021 21:28:46 +0100	[thread overview]
Message-ID: <20210406212846.78dc2503@digimed.co.uk> (raw)
In-Reply-To: <70fb4ca7-ca39-9454-6c58-f6a352fe8373@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

On Tue, 6 Apr 2021 14:42:28 -0500, Dale wrote:

> > cron only sends an email if the job produces any output. If the script
> > follows the *nix principle of succeed quietly, fail noisily, you
> > should only get emails when things go wrong. However without seeing
> > your mail-backup script, it is hard to say what needs to change.
> >
> > The "|| true " part means this cron task will always return success,
> > even if the script fails, which possibly is not what you want.
> >
> >  
> 
> 
> My script, if one wants to call it that, just has rsync commands in it. 
> It doesn't get fancy.  I literally copy the commands from Konsole and
> paste them in my text file.  I make it executable and that's my script. 
> I wouldn't even think it rises to a bash thing even tho it is at the
> top, cron likes it that way.  For years, I been doing it manually.  I
> just wanted to automate the thing a bit. 

But what are the rsync commands and what information does cron mail you?

Without this information, we can only make wild guesses as to what is
going on. As a first wild guess though, rsync has a --quiet option that
means it only outputs error messages, are you using this?

As John said, your cron script only calls the backup script, so you may
as well put that in cron.hourly.


-- 
Neil Bothwick

...Advert for restaurant:
  "Exotic foods for all occasions. Police balls a speciality."

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-06 20:29 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 [this message]
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

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=20210406212846.78dc2503@digimed.co.uk \
    --to=neil@digimed.co.uk \
    --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