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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is my cron job sending me email

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
I have a job scheduled via cron.
It runs fine but sends me a blank email every day.
There are no echo or print statements in the job.
Why am I getting this email and how do I stop it ?
 
This is normal behaviour. To stop receiving the mail, your crontab entry should look something like:

00 02 * * * /script > /dev/null 2>&1

The latter parts redirect output to /dev/null, the bit-bucket. Be warned that any errors will also be lost, so you might not know if a job has failed if you take this course. Change /dev/null to the path to a log file if you don't want this to happen. HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top