Fmdpa Posted February 22, 2011 Share Posted February 22, 2011 I'm working on a cron job for my website. In the form for creating a new cron job, my web host's cPanel requires a Linux command for the cron job. What is the Linux command for running a PHP script? Link to comment Share on other sites More sharing options...
Synook Posted February 22, 2011 Share Posted February 22, 2011 php <scriptname> Link to comment Share on other sites More sharing options...
justsomeguy Posted February 22, 2011 Share Posted February 22, 2011 That assumes that the PHP directory is in the path, if it's not you'll need to ask your host where PHP is. You can also print the path to make sure it's in there (or just try it and see if it finds the executable). Link to comment Share on other sites More sharing options...
Fmdpa Posted February 22, 2011 Author Share Posted February 22, 2011 I contacted support. Since I am on a shared server, this is how it works: php -q /home/username/public_html/testrun.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.