sastro Posted August 21, 2010 Share Posted August 21, 2010 Here is my cron job */10 * * * * wget http://127.0.0.1:8008/myfile.php 2>&1 >/dev/null It keeps create a new file on my root dir (myfile.php,myfile1.php,myfile2.php etc) with empty size and also send email to root@server. Please help Quote Link to comment https://forums.phpfreaks.com/topic/211384-cron-problem/ Share on other sites More sharing options...
trq Posted August 22, 2010 Share Posted August 22, 2010 You have described the expected behavior. What exactly is the issue? Quote Link to comment https://forums.phpfreaks.com/topic/211384-cron-problem/#findComment-1102237 Share on other sites More sharing options...
sastro Posted August 22, 2010 Author Share Posted August 22, 2010 What is the the command in cron to avoid cron to create a file and send email? Quote Link to comment https://forums.phpfreaks.com/topic/211384-cron-problem/#findComment-1102260 Share on other sites More sharing options...
trq Posted August 22, 2010 Share Posted August 22, 2010 Its not Cron that is creating the file, but the command you are telling Cron to execute. Is there a particular reason you are making a http request for the php file instead of executing it via the cli? Quote Link to comment https://forums.phpfreaks.com/topic/211384-cron-problem/#findComment-1102308 Share on other sites More sharing options...
sastro Posted August 22, 2010 Author Share Posted August 22, 2010 Thanks for help. I change wget to /usr/bin/php -q and its working good. Quote Link to comment https://forums.phpfreaks.com/topic/211384-cron-problem/#findComment-1102389 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.