vineld Posted August 23, 2009 Share Posted August 23, 2009 I am running cron jobs on a shared server as follows: */2 * * * * /usr/local/bin/php /home/xxxxxx/domains/xxxxxx/public_html/mydir/myfile.php > /dev/null 2>&1 However, the file never seems to run properly. I have other cron jobs running on the same server which work just fine. The file I am trying to run works as it should when I access it directly so I am not sure at all what to do..., what could be the problem? Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/ Share on other sites More sharing options...
phpretard Posted August 23, 2009 Share Posted August 23, 2009 /usr/local/bin/php /home/xxxxxx/domains/xxxxxx/public_html/mydir/myfile.php > /dev/null 2>&1 is that space actually there? /usr/local/bin/php---space---/home/xxxxxx/domains/xxxxxx/public_html/mydir/myfile.php > /dev/null 2>&1 %20% Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/#findComment-904575 Share on other sites More sharing options...
vineld Posted August 23, 2009 Author Share Posted August 23, 2009 Yup, the space is there. I tried changing to using wget instead of php and then it works for some reason... I do however use php for the other cron jobs, although for another domain but that shouldn't make a difference? Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/#findComment-904583 Share on other sites More sharing options...
phpretard Posted August 23, 2009 Share Posted August 23, 2009 Are your other cron scripts running with the same %20%? Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/#findComment-904587 Share on other sites More sharing options...
vineld Posted August 23, 2009 Author Share Posted August 23, 2009 Yeah, they are and they work just fine. Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/#findComment-904598 Share on other sites More sharing options...
vineld Posted August 23, 2009 Author Share Posted August 23, 2009 Could it have to do with permissions on the target side? The request reaches the target files and it produces an output although the cron file does not seem to be able to retrieve the content for some reason. Link to comment https://forums.phpfreaks.com/topic/171531-cron-problem/#findComment-904628 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.