Jump to content

major problems with cron


ohdang888

Recommended Posts

i want to run a php file with cron. I'm using cPanel's cron standard viewer to craete it.

 

 

My problem is with the file directory

 

i've got this:

/usr/local/bin/php -q http://mysite.com/testing/cron/cron_job.php

 

its executing the command, but the directory is messed up..i'm getting this error emailed to me:

 

Could not open input file: http://mysite.com/testing/cron/cron_job.php

 

Any ideas? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/157092-major-problems-with-cron/
Share on other sites

Probably because your PHP isn't in your server variable environment. So you can either edit your BASH and include it or you have to include the full path of your PHP. So ex:

 

 

/usr/local/php/bin/php -q /home/tcrush/public_html/cron/cron.php

 

 

That should work for you.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.