This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Managing the flow of email coming from cron(8) can be a challenge, especially when you manage a lot of machines. Either cron always mails, or you pipe the output to /dev/null and never see anything, or you have to use wrapper scripts.
To improve the situation I proposed to add a simple crontab(5) convenience option called "-n" (mnemonic "No mail if run successful"). An example of using the "no mail if success" option is below:
* * * * * -n cp -rv src/ dest/
With the above example crontab(5) entry you'll only receive a mail from cron(8) if the cp(1) encountered some kind of error. You'll also have in that email up until what point cp(1) actually was able to copy files.
More information and the patch: https://marc.info/?l=openbsd-tech&m=152874866117948&w=2
I hope more cron implementations implement this feature! :-)
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/sysadmin/co...