From owner-freebsd-questions@freebsd.org Fri Sep 11 13:12:04 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 528023D9BB2 for ; Fri, 11 Sep 2020 13:12:04 +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 4Bnx432XTfz4Kn5 for ; Fri, 11 Sep 2020 13:12:03 +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=1599829911; bh=/2p6vWBXICyC1OyvKoVuU/wdkRLHHHByxyrLu33NrYg=; h=To:From:Subject:Date; b=m9SESe19NC+5gfBEjbJyRLNzalBbc5AEMMxzsDEiqaAam41NwZ0WM1y3KrciNrgkD ra7saE23+N4bVeVMzjwHn7Fo6XmsIvQ0G5QpkBJEan/gt9kBn2/LBUDDzbrsx8qeHq u9AJ+shH2IQ5zZTdVwTXQlvl+p/Wn5niBeMcO7tg= To: FreeBSD Mailing List From: Per olof Ljungmark Subject: How to silence cron? Message-ID: Date: Fri, 11 Sep 2020 15:11:49 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bnx432XTfz4Kn5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nethead.se header.s=NETHEADSE header.b=m9SESe19; 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.65 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995]; 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]; NEURAL_HAM_LONG(-1.00)[-1.005]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[nethead.se:+]; DMARC_POLICY_ALLOW(-0.50)[nethead.se,none]; NEURAL_HAM_SHORT(-0.65)[-0.646]; 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 13:12:04 -0000 Hi, What would be the proper way to silence output from a php script running under cron? I have tried variations of /dev/null and 2>&1 but getting nowhere. Abbriviated crontab looks like SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin MAILTO="someimportantperson" */5 * * * * su -m www -c "/usr/local/bin/php /usr/local/www/pathtoscript.php" Roots shell is FBSD standard csh www's shell is /usr/sbin/nologin With the rest of the crons I do want mail to be sent, just not this one. Thanks, Per