anon Posted December 21, 2007 Share Posted December 21, 2007 Hi, i want to make a web crawler. The thing is, how would i run it on my hosted account? It would be like a program, but in PHP. Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/ Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2007 Share Posted December 21, 2007 are you using linux then you should schedule it in a CRON Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420358 Share on other sites More sharing options...
anon Posted December 21, 2007 Author Share Posted December 21, 2007 So a php file can definitely run as a program type thingy using CRON. And my host won't terminate because its running? Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420363 Share on other sites More sharing options...
chigley Posted December 21, 2007 Share Posted December 21, 2007 It depends how often you were to run it. Frequent CRONs are best to be done on your own server, not a shared hosting package. Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420364 Share on other sites More sharing options...
anon Posted December 21, 2007 Author Share Posted December 21, 2007 It would be like once a day. Â What would the command be to run it? Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420365 Share on other sites More sharing options...
chigley Posted December 21, 2007 Share Posted December 21, 2007 /usr/local/bin/php /home/SERVERUSERNAME/public_html/path/to/file.php  On some servers you don't need the '/usr/local/bin/' part. Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420367 Share on other sites More sharing options...
anon Posted December 21, 2007 Author Share Posted December 21, 2007 But would this make it a CRON job? Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420368 Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2007 Share Posted December 21, 2007 you'll have to check your admin panel, if you have cpanel it would be good Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420369 Share on other sites More sharing options...
anon Posted December 21, 2007 Author Share Posted December 21, 2007 So with Cpanel, i could do the whole thing from there, or would i still need to SSH? Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420372 Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2007 Share Posted December 21, 2007 cpanel has a interface for setting up the CRON, you can do it through SSH but its quite a hassle Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420373 Share on other sites More sharing options...
anon Posted December 21, 2007 Author Share Posted December 21, 2007 Thanks very much dude! Quote Link to comment https://forums.phpfreaks.com/topic/82652-solved-running-a-php-script/#findComment-420376 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.