Guardian-Mage Posted July 11, 2008 Share Posted July 11, 2008 My host is bluehost and I am using cPanel. My Cron job is set to run every 2 minutes (Which it does since I get an email every 2 minutes). My code is this <?php echo "TEST"; ?> I get the following email: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of file My command is this /usr/bin/php -q /home2/safetyha/public_html/globaltrainingedge.com/emailer/cron.emailer.php If I use quotes "/usr/bin/php -q /home2/safetyha/public_html/globaltrainingedge.com/emailer/cron.emailer.php" I get this: /bin/sh: php5 -q /home2/safetyha/public_html/globaltrainingedge.com/emailer/cron.emailer.php: No such file or directory Link to comment https://forums.phpfreaks.com/topic/114191-solved-php-via-cron/ Share on other sites More sharing options...
rhodesa Posted July 11, 2008 Share Posted July 11, 2008 not sure what the -q switch is...usually i use -f: /usr/bin/php -f /home2/safetyha/public_html/globaltrainingedge.com/emailer/cron.emailer.php Link to comment https://forums.phpfreaks.com/topic/114191-solved-php-via-cron/#findComment-587190 Share on other sites More sharing options...
DarkWater Posted July 11, 2008 Share Posted July 11, 2008 -q is not a valid PHP flag in my PHP binary, where did you see to use that? Use -f. Link to comment https://forums.phpfreaks.com/topic/114191-solved-php-via-cron/#findComment-587192 Share on other sites More sharing options...
Guardian-Mage Posted July 11, 2008 Author Share Posted July 11, 2008 shouldn't -q suppress the header output so it won't send me an email unless I output stdout? Link to comment https://forums.phpfreaks.com/topic/114191-solved-php-via-cron/#findComment-587460 Share on other sites More sharing options...
Guardian-Mage Posted July 11, 2008 Author Share Posted July 11, 2008 -q was write but my host had a problem on the server they had to fix Link to comment https://forums.phpfreaks.com/topic/114191-solved-php-via-cron/#findComment-587470 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.