From owner-freebsd-questions Thu Jun 24 23:29:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [212.110.138.1]) by hub.freebsd.org (Postfix) with ESMTP id D99C614A2E for ; Thu, 24 Jun 1999 23:28:45 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id JAA13995; Fri, 25 Jun 1999 09:28:00 +0300 (EEST) (envelope-from ru) Date: Fri, 25 Jun 1999 09:28:00 +0300 From: Ruslan Ermilov To: Scott Worthington Cc: freebsd-questions@FreeBSD.ORG, wmptl@MNSi.Net Subject: Re: cron difficulties Message-ID: <19990625092800.C5584@relay.ucb.crimea.ua> Mail-Followup-To: Scott Worthington , freebsd-questions@FreeBSD.ORG, wmptl@MNSi.Net References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Scott Worthington on Thu, Jun 24, 1999 at 02:14:34PM -0700 X-Operating-System: FreeBSD 3.2-STABLE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jun 24, 1999 at 02:14:34PM -0700, Scott Worthington wrote: > Alright, Nathan... I'm not sure that anyone has really helped you with > your cron problem. > > Here's what is going on (and how to solve the problem): > > Your cron'ed software is generating output, there are two kinds: > standard output > standard error > > This is controlled by your shell. To learn more, type 'man sh' > Press the '/' key and type in standard error. > > Okay, here's the problem with your cron: > You are going to redirect the standard out AND standard error to the > device null. > > nameofcommand 2>&1 > /dev/null > It's better to write ``nameofcommand >/dev/null 2>&1'' instead. > 'nameofcommand' is the command that you want run > 2>&1 tell the shell that both the standard error and standard output > are going to be redirected (NOT PIPED) to the device /dev/null > which 'throws the data into the bit bucket--bye'. > > Let us know your results. > [...] > If anyone out there knows how turn off the mail feature of cron altogether > that would be nice, if not for just the cron jobs that are causing > annoyances, a copy of the /etc/crontab follows appends this note. > According to crontab(5) manpage: } If MAILTO is defined (and non-empty), mail is sent to the user so named. } If MAILTO is defined but empty (MAILTO=""), no mail will be sent. ^^^^^^^^^^^^^^^^^^^^ } Otherwise mail is sent to the owner of the crontab. Cheers, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message