FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free 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 ?
Related topics
Cron Job to Backup MySQL Database
cron job
How to run a cron job on a server
Cron job
Why doesn't my cronjob work?
what can a cron job do for you?
Cron job
script show off- simplecron(tmp name, might change)
ΏCron Job en Frihost?
How to get a php script working under a cron job?
Sessions & cookies - member no longer active question
Run a php Script with a Cron Job
Possible cron job usage?
Cron Job usage on FriHost
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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