From owner-freebsd-questions@freebsd.org Fri Sep 11 15:28:09 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECF393DDDFD for ; Fri, 11 Sep 2020 15:28:09 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns1.nethead.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bp0546JTKz4TgF for ; Fri, 11 Sep 2020 15:28:08 +0000 (UTC) (envelope-from peo@nethead.se) X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1599838081; bh=CZPmBNEBsob9momywhD91aR3JlgTYqI2hWCuQT7nZxo=; h=Subject:To:References:From:Date:In-Reply-To; b=18dkdlpcjsHsPjCzY9H4uLbjqVO83R62eONRPbsavPHqQu0b306RN4L0GJivwwK+w GIJbyvA2tJji4U2bL0QAGd4KLouhgVLOxAtE91+YP9o7zD9MCXXfOCtk2jnUv9TTam 9eqEhhQYlJts4toX4sAXsT2XvHsNbAD7OXWnjGu8= Subject: Re: How to silence cron? To: freebsd-questions@freebsd.org References: <41377ad1-4162-1194-7172-234c4d172e6d@mm.st> <20200911153307.690190ed@gumby.homeunix.com> <20200911143949.GE91422@bastion.zyxst.net> From: Per olof Ljungmark Message-ID: <50422f0c-0acd-5847-ed11-e5f505b10a24@nethead.se> Date: Fri, 11 Sep 2020 17:27:58 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200911143949.GE91422@bastion.zyxst.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Bp0546JTKz4TgF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nethead.se header.s=NETHEADSE header.b=18dkdlpc; dmarc=pass (policy=none) header.from=nethead.se; spf=pass (mx1.freebsd.org: domain of peo@nethead.se designates 5.150.237.139 as permitted sender) smtp.mailfrom=peo@nethead.se X-Spamd-Result: default: False [-2.84 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.020]; R_DKIM_ALLOW(-0.20)[nethead.se:s=NETHEADSE]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:5.150.237.139]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.006]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[nethead.se:+]; DMARC_POLICY_ALLOW(-0.50)[nethead.se,none]; NEURAL_HAM_SHORT(-0.81)[-0.811]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:8473, ipnet:5.150.192.0/18, country:SE]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 15:28:10 -0000 On 2020-09-11 16:39, tech-lists wrote: > On Fri, Sep 11, 2020 at 03:32:40PM +0100, RW via freebsd-questions wrote: >> On Fri, 11 Sep 2020 16:22:22 +0300 >> xtouqh@mm.st wrote: >> >> >>> crontab(5) describes -n, which will silence only the successful runs, >>> i.e: >>> >>> */5 * * * * -n su -m www -c "...." >> >> >> Where does it say that in crontab(5)? > > man 5 crontab[1], a couple of pages down: > > [...] > >     The following command options can be supplied: > >      -n      No mail is sent after a successful run.  The execution output >              will only be mailed if the command exits with a non-zero exit >              code.  The -n option is an attempt to cure potentially > copious >              volumes of mail coming from cron(8). > >      -q      Execution will not be logged. > > [...] > > [1] FreeBSD 13.0-CURRENT #0 r365391M: Tue Sep  8 23:06:14 BST 2020 This is 11-STABLE, it's got -n but not -q. Thank you all for answering. However, when I try */5 * * * * -n su -m www -c "...." I get "/bin/sh: -n: not found" More quotes?