Cron

Status
Not open for further replies.

KingOfTheEmblem

New Member
Messages
41
Reaction score
0
Points
0
I run cron every 10mins due to a game but i get a bizzillion emails from the cron dump and if i blacklist the emails my cron doesnt go through but there are so many emails its not funny and it runs up my disk space. Why cant you block the emails and delete them.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
OR why can you google a bit more and learn how to redirect the cron output to /dev/null :p
 

KingOfTheEmblem

New Member
Messages
41
Reaction score
0
Points
0
Why cant i google? I have no idea to be honest. But then again i could try but seeing as i was told this was a good question by a account manager and was told to post here i did.
 

Russ

<b>Retired *****</b>
Messages
3,168
Reaction score
2
Points
38
Here.. i'll get this one...

Just add the following at the end of the cron command, before the semi-colon:

2>&1

This will redirect the stderr stream to the standard output, which in turn is redirected to /dev/null
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Actually as a cron, it should look something like this
Code:
*/6 * * * * /me/newb/somecommandwhichidontwantanemail >> /dev/null 2>&1
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
I don't think you can edit that in cPanel though, I think it appended the e-mail at the end of each line.
 

Russ

<b>Retired *****</b>
Messages
3,168
Reaction score
2
Points
38
Slothie, you're right. We were on irc and worked with it some after I posted.
 
Status
Not open for further replies.
Top