You can send output to /dev/null, by using command >/dev/null syntax. However, this will not work when command will use the standard error (FD # 2). So you need to modify >/dev/null as follows to redirect both output and errors to /dev/null:
$ command > /dev/null 2>&1You can also use the same syntax for all your cronjobs to avoid emails and output / error messages:
$ ./script.sh > /dev/null 2>&1
$ ./example.pl > /dev/null 2>&1
@hourly /scripts/backup/nas.backup >/dev/null 2>&1
No comments:
Post a Comment