I have an Ubuntu 14.04 virtual private server.
There are a few cronjobs defined:
00 03 * * * cd /root && ./backupJob.sh 00 04 * * * sudo -u www-data php /var/www/dir/htdocs/bin/indexer.php 00 05 * * * cd /root && ./cleanUpUploadedFilesJob.sh
Now the sysadmin receives an email for every cronjob that's executed, even on success. Note that I have a postfix running on the same machine and there is no
MAILTO="" in the crontab.
The goal is to only receive an email when the script has an exit value other than 0.
If I add
1>/dev/null to every line, will my standard out be redirected? Will the behavior for standard error stay the same otherwise?