freebsd-dev/usr.sbin/cron/crontab
Kyle Evans 5b80de237b cron: add log suppression and mail suppression for successful runs
This commit adds two new extensions to crontab, ported from OpenBSD:
- -n: suppress mail on succesful run
- -q: suppress logging of command execution

The -q option appears decades old, but -n is relatively new. The
original proposal by Job Snijder can be found here [1], and gives very
convincing reasons for inclusion in base.

This patch is a nearly identical port of OpenBSD cron for -q and -n
features. It is written to follow existing conventions and style of the
existing codebase.

Example usage:

# should only send email, but won't show up in log
* * * * * -q date

# should not send email
* * * * * -n date

# should not send email or log
* * * * * -n -q date

# should send email because of ping failure
* * * * * -n -q ping -c 1 5.5.5.5

[1]: https://marc.info/?l=openbsd-tech&m=152874866117948&w=2

PR:		237538
Submitted by:	Naveen Nathan <freebsd_t.lastninja.net>
Reviewed by:	bcr (manpages)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20046
2019-09-25 02:37:40 +00:00
..
crontab.1 Add a 'force' option for non-interactive crontab removal 2016-12-20 17:12:17 +00:00
crontab.5 cron: add log suppression and mail suppression for successful runs 2019-09-25 02:37:40 +00:00
crontab.c Add a 'force' option for non-interactive crontab removal 2016-12-20 17:12:17 +00:00
Makefile usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:38:03 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00