From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3411F1382C5 for ; Tue, 6 Apr 2021 19:58:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7CC8E09AB; Tue, 6 Apr 2021 19:58:24 +0000 (UTC) Received: from covici.com (debian-2.covici.com [166.84.7.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 293B0E0990 for ; Tue, 6 Apr 2021 19:58:22 +0000 (UTC) Received: from ccs.covici.com (ccs.covici.com [70.109.53.110]) (authenticated bits=0) by covici.com (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTPSA id 136JveOA000546 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Tue, 6 Apr 2021 15:57:42 -0400 Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.15.2/8.15.2) with ESMTPS id 136JwGwo4144846 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Tue, 6 Apr 2021 15:58:16 -0400 Received: (from covici@localhost) by ccs.covici.com (8.15.2/8.15.2/Submit) id 136JwGpw4144845; Tue, 6 Apr 2021 15:58:16 -0400 Date: Tue, 06 Apr 2021 15:58:16 -0400 Message-ID: From: John Covici To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Cron and disabling emails for one script only In-Reply-To: <0c318816-b4ad-3e3f-cbed-057b142a37bd@gmail.com> References: <0c318816-b4ad-3e3f-cbed-057b142a37bd@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/27 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Covici Computer Systems Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b3f125be-f709-4327-8347-9ea46139214b X-Archives-Hash: 2bfe8f05ce87fe38a171f58c8b046184 On Tue, 06 Apr 2021 13:43:31 -0400, Dale wrote: >=20 > Howdy, >=20 > I set up a hard drive to backup my emails, world file, /etc and a couple > other things.=A0 I been doing it manually but finally set up a cron job to > run it automatically.=A0 I call it a script but some may laugh at me > calling it that.=A0 Anyway, I got cron to run it just fine.=A0 It runs and > copies it over just like it should.=A0 I set it to do that each hour.=A0 > Thing is, it sends a email every time it does it.=A0 I don't mind a email > if there is a error but don't want one if it runs successfully.=A0 This is > the cron file I set up.=A0 It's placed in the hourly directory. >=20 >=20 > #!/bin/bash > /root/mail-backup > /dev/null 2>&1 || true > # >/dev/null 2>&1 >=20 >=20 > I got a lot of hits doing a google search and the only thing I see is to > direct it to /dev/null.=A0 From examples I've seen, this should work.=A0 I > then ran across the one currently up there with true in it.=A0 I don't > understand that but tried it anyway.=A0 It still sends emails.=A0 I also > tried the one commented out below that as well.=A0 Still emails.=A0 >=20 > Keep in mind, I do not want to disable ALL emails, just this one > script.=A0 How does one disable emails for this one cron job?=A0 Do I hav= e a > typo or putting it in wrong place maybe?=A0 Everything I found shows this > should work but obviously I'm doing something wrong.=A0 Again, error > emails are fine.=A0 I don't want successful runs tho.=A0 >=20 > Thanks much. I think you have to do it in your actual backup script or put the whole thing in the hourly directory putting >/dev/null at the end of each rsync command, but leaving off the 2>&1, so you will get error messages. --=20 Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici wb2una covici@ccs.covici.com