Web Hosting Talk







View Full Version : CPanel Cron Question


Etherwood
11-21-2009, 04:31 PM
I have a cron job in CPanel to run every minute.
Whats the correct way to blackhole the emails?

Do I set the email address as >>/dev/null ?

bluemediaprint
11-22-2009, 03:15 AM
Use this -

/dev/null 2>&1

What happens here is as follows:

1. We send standard output to /dev/null, using > /dev/null.
2. 2>&1 - ensures that you send the standard error (file descriptor 2), to wherever standard output (file descriptor 1) is going, which is, as already established, to the bitbucket.

Etherwood
11-22-2009, 08:54 PM
Thats what I was looking for.
Thanks you that ;)

bluemediaprint
11-22-2009, 10:19 PM
Most welcome :)