What happens with the output to the browser when you run the .php with an cron job ?
Cron job and browser output question
If you set your email address and don't do the "> /dev/null", it will be emailed to you.
Thanks, but, how do you set your e-mail adres ? (I'm new to php)
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.
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.
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 ?
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 ?
| 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.
I'm on server2 with DirectAdmin, don't find such an field there
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 ?
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 ?
