Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crontab output to printer, emails to root 2

Status
Not open for further replies.

peterve

IS-IT--Management
Mar 19, 2000
1,348
NL
I have schedules a couple of scripts to run on our Red Hat EL AS4.
One of the jobs is sending the output to a printer.
In most cases, there will be no output at all,
but I'm still getting spammed with emails with the following content :
"stdin is empty, so no job has been sent"

How can I suppress these messages ? (and only get something when something was printed ?)

--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
 
redirect the output of the job to dev/null including errors and the emails should stop

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I use:
myscript.sh >/dev/null 2>&1

to get cron output to shutup for me :)

----
JBR
 
thanks

--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top