| Headlines |
| 2018-06-15 |
Hiding successful cron output |
 |
System administrators have always faced a challenge when it comes to dealing with scheduled tasks. Specifically, each task that runs likely generates output which is e-mailed to the administrator. Most of the messages will be simple confirmations that everything went according to plan, but sometimes the output will indicate something went wrong. It is not a good idea to discard all of the messages and it can be cumbersome to set up filters to deal with the torrent of e-mails. Job Snijders has published a patch for OpenBSD's implementation of cron which allows the administrator to discard all output in cases where jobs complete successfully, but also be e-mailed a command's complete output if the job fails. "To improve the situation I propose to add a simple crontab(5) convenience option called '-n' (mnemonic 'No mail if run successful'). Note that options already are a thing in vixie cron ('-q' has existed for decades?), but are not part of POSIX. With this 'no mail if success' option you can do things like: * * * * * -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 e-mail up until what point cp(1) actually was able to copy files." The NetBSD team has already adopted the new cron feature.
|
More headlines from this project
Back to News
|
|
| TUXEDO |

TUXEDO Computers - Linux Hardware in a tailor made suite Choose from a wide range of laptops and PCs in various sizes and shapes at TUXEDOComputers.com. Every machine comes pre-installed and ready-to-run with Linux. Full 24 months of warranty and lifetime support included!
Learn more about our full service package and all benefits from buying at TUXEDO.
|
| Star Labs |

Star Labs - Laptops built for Linux.
View our range including the highly anticipated StarFighter. Available with coreboot open-source firmware and a choice of Ubuntu, elementary, Manjaro and more. Visit Star Labs for information, to buy and get support.
|
|