I hope some one can answer my question... My website host company only alows me to run a Cron job every hour, however i need my php script to run every 5 minutes. So what i want to do is set up my php script to be Cron'ed every hour, then wait 5 miniutes and run the script again, the php script itself will only last 2 seconds... My question is after the script has ran for 2 seconds, would the 5 minute wait put any load on the server ?
The short answer is no, there wouldn't be load from it but the long answer is that it's probably a futile effort. If they only let you cron once an hour, they're not going to let you run the script indefinitely (even though it's waiting, it's still technically 'running'). I'd suggest setting up an external cron job that just hits the page on your site whenever you want it to. There are a number of sites that do this for a fee, or if your home internet connection is decent, just set it up on your PC.
Yea, you can also use a free webhost or maybe another webhost that doesn't have such restrictions. Like: http://x10host.com/ Then you can use the 'wget' or the 'lynx' command within the Cron job to call up your PHP script on your current host every 5 minutes. Thomas
Thats interesting, problem is http://x-10hosts.com is showing lots of MySql database errors, is there another free webhost that alows this ?
x10hosting.com This one's different. There are lots of free PHP hosts out there. Here is a list of free PHP webhosts. They usually have CPanel support. http://www.0php.com/free_PHP_hosting.php If you have your own domain, PM me to get a link to free hosting Thomas