MemphiS Posted November 2, 2008 Share Posted November 2, 2008 is this the correct command? php /home/username/public_html/cronjobs/runcron.php > /dev/null ????? Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/ Share on other sites More sharing options...
ratcateme Posted November 2, 2008 Share Posted November 2, 2008 that looks right. i find it is better to have no output besides errors then if it gets an error it sends me an email rather than sending it all to /dev/null your email problem could be more related to your actual code? Scott. Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-680446 Share on other sites More sharing options...
MemphiS Posted November 2, 2008 Author Share Posted November 2, 2008 Thanks, There ist any errors as such.. Just sick of all the Emails!! What is the command for just receiving mail when theres an error? Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-680456 Share on other sites More sharing options...
ratcateme Posted November 2, 2008 Share Posted November 2, 2008 if you remove the > /dev/null then takeout all your echo's and print's so php makes no output. then when you get an error it should make output and send you an email. Scott. Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-680461 Share on other sites More sharing options...
MemphiS Posted November 2, 2008 Author Share Posted November 2, 2008 Hmm None of my scripts used for cron have echo or prnt outputs. Its just to upated Statistics every 10minutes and to update afew other website mysql functions Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-680467 Share on other sites More sharing options...
MemphiS Posted November 10, 2008 Author Share Posted November 10, 2008 ??? Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686500 Share on other sites More sharing options...
ratcateme Posted November 10, 2008 Share Posted November 10, 2008 well what is contained in the emails you are getting? i guess you can just go php /home/username/public_html/cronjobs/runcron.php > /dev/null but i just have found it best to leave that out and i only get emails when something goes wrong Scott. Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686503 Share on other sites More sharing options...
MemphiS Posted November 10, 2008 Author Share Posted November 10, 2008 I get the following X-Powered-By: PHP/4.4.4 Content-type: text/html Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686511 Share on other sites More sharing options...
blueman378 Posted November 10, 2008 Share Posted November 10, 2008 so your getting sent the headers? Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686516 Share on other sites More sharing options...
MemphiS Posted November 10, 2008 Author Share Posted November 10, 2008 Yea i guess so :s Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686517 Share on other sites More sharing options...
kenrbnsn Posted November 10, 2008 Share Posted November 10, 2008 Instead of php /home/username/public_html/cronjobs/runcron.php > /dev/null use php -q -f /home/username/public_html/cronjobs/runcron.php > /dev/null Ken Quote Link to comment https://forums.phpfreaks.com/topic/131059-cron-jobs-preventing-emails/#findComment-686580 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.