How to silence cron output e-mails?

Status
Not open for further replies.

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
Hi,

I'm using onetimedns.net for my dynamic DNS needs, and I have e-mail reporting set-up.
As suggested on the site, I've added an entry to cron to perform these updates every 15 minutes:
Code:
00,15,30,45 * * * * /usr/local/bin/curl "https://onetimedns.net/set?name=myhostname&secret=mypassword"

Unfortunately I'm getting e-mails, whenever the command is ran.
So far I've tried changing it to:
Code:
00,15,30,45 * * * * /usr/local/bin/curl "https://onetimedns.net/set?name=myhostname&secret=mypassword" > /dev/null

Code:
00,15,30,45 * * * * /usr/local/bin/curl "https://onetimedns.net/set?name=myhostname&secret=mypassword" &> /dev/null

Code:
00,15,30,45 * * * * /usr/local/bin/curl -s "https://onetimedns.net/set?name=myhostname&secret=mypassword"



And I'm still getting an e-mail with the output.
How can I get rid of it?
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Is the cron task set to run as 'nobody'? Are the redirect options checked?
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
Try to set MAILTO="" variable at the start of your crontab file.
Setting the con job via GUI was enough to get it working without notification about the results every time it runs.


Wysłane z iPhone za pomocą Tapatalk
 
Status
Not open for further replies.
Top