View Full Version : "prevent-email" in cron
survice
07-04-2009, 11:18 AM
Hello,
What does "prevent-email" in the cron section do ?
when should i enable/disable it ?
Kind regards,
Survice
tillo
07-04-2009, 11:27 AM
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.
survice
07-04-2009, 11:54 AM
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 ?
tillo
07-04-2009, 04:53 PM
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.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.