Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am facing an issue with Ubuntu server. I am running a PHP script using a cron job which executes every 5 minutes. This folder spool/mqueue is showing 112GB space. The scripts job is to fetch data from MySQL. If there is no data it will show an error. Now there is an error and cron is trying the send the mail to the users where user email is not defined and it is creating log file in mqueue folder.

How to customize cron so that it would not send mails and write logs?

share|improve this question
What is the 'ubuntu space issue' if you only want cron to shut up? – aquaherd Jan 25 '13 at 9:22

1 Answer 1

up vote 9 down vote accepted

You can set the MAILTO variable in your crontab.

Just type the following at the top of your crontab (crontab -e):


and cron will not send any mail for any of the jobs. If you have to disable mails for a specific task, use the following:

@hourly /path/to/ >/dev/null 2>&1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.