FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Cron job and browser output question

 


DeadX
What happens with the output to the browser when you run the .php with an cron job ?
snowboardalliance
If you set your email address and don't do the "> /dev/null", it will be emailed to you.
DeadX
Thanks, but, how do you set your e-mail adres ? (I'm new to php)
kv
Leaving out the details, it would be safer to say

1. The output to browser (echo, print and html contents) will be discarded.
2. The actions (like query/update to database, sending mails, writing to a file, etc) will be executed.
DeadX
Thanks,
for 1., if they are discarted, does that mean that the execution time of the script will be shorter than just running the script with link in browser, or is it like the output is send without someone recieving it ?
snowboardalliance
DeadX wrote:
Thanks, but, how do you set your e-mail adres ? (I'm new to php)


In cPanel in the cron jobs part, there is a field to enter your email address.
DeadX
I'm on server2 with DirectAdmin, don't find such an field there Sad

guess I will have to make an variable to write the output to and then mail it with the script at the end of the script then.
Or is there an "> /dev/null"-alternative that let's you set an e-mail adres as output device ?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.