"prevent-email" in cron

survice

Verified User
Joined
May 6, 2009
Messages
16
Hello,

What does "prevent-email" in the cron section do ?

when should i enable/disable it ?

Kind regards,
Survice
 
Cron automatically sends an Email message containing both stdout and stderr outputs of any executed command. The "Prevent Email" button just helps getting rid of that message by suffixing the command with ">/dev/null 2>&1", which is how you redirect the stdout and stderr to nowhere in a shell.

If you set a cronjob and you don't want to receive any message containing the output of the executed command, click on it. In you want to receive it, don't click on it.
 
hey martino,

thanks for the help.

i am not getting any output from the jobs that i am creating.

i checked that the path i correct and i start all my php scripts as follows:

/usr/local/bin/php "/path/to/script/"

what could be causing this ?
 
Usually scripts created specifically to be run as cronjobs don't throw any output unless an error occours. This way if there is no error you won't receive any Email message and viceversa.

If you are saying that your script doesn't even get to run at the specified time, that's another problem. There is plenty of threads about how to correctly call a script from cron in this very forum, use the search function.
 
Back
Top