Reputation: 6461
I would like to disable my cronjob from sending me Emails.
My cronjob is executing a php file.
At the top of this file I wrote:
#!/usr/bin/php
<?php
$ crontab -e
MAILTO=""
But this is not helping.
I also tried
#!/usr/bin/php
>/dev/null 2>&1.
Upvotes: 1
Views: 1557
Reputation: 2480
With putty connect to your server.
In the command line :
crontab -e
It will open you cron in editor. If it's vi the editor by default, Press "i" to insert mode. Then put on the first line
MAILTO=""
Press "Esc" to stop insert mode and ":x" to quit and save.
If you don't know how to connect to your server, you need to contact your sysAdmin.
Upvotes: 2