How to silence cron?
Per olof Ljungmark
peo at nethead.se
Fri Sep 11 15:28:10 UTC 2020
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 at 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?
More information about the freebsd-questions
mailing list