Oxymoronic Posted September 23, 2007 Share Posted September 23, 2007 Hello all Is it possible to have a php web page run continuously in the background like a thread? I'm thinking of how a servlet would work... Basicaly, I would like this page to download a css feed every couple of minutes, an I was wondering if it were possible to do this without some sort of script on my own pc dothing this, then uploading to my web hosting service. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 23, 2007 Share Posted September 23, 2007 you can use a cron job. Quote Link to comment Share on other sites More sharing options...
Oxymoronic Posted September 23, 2007 Author Share Posted September 23, 2007 Thanks for the amazingly fast reply. After quickly reading up on what a cron job was, I came to the conclusion that it would not solve my problem. First of all the hosting account is on a windows box, and secondly, I dont have access to the system to run commands. Thanks again tho. Quote Link to comment Share on other sites More sharing options...
rarebit Posted September 23, 2007 Share Posted September 23, 2007 Use 'cron' or 'task scheduler' from any machine to call an update page on the server... Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted September 23, 2007 Share Posted September 23, 2007 Cron doesn't have to be on your sever, only the scripts. Instead find a server to set up cron (a lot of people will do it for you for a really low rate) that pings your script at X intervals. And cron is what you want, any derivation will do, but the concept is a crontab Quote Link to comment Share on other sites More sharing options...
Oxymoronic Posted September 23, 2007 Author Share Posted September 23, 2007 I'm trying to make it so that the php page is acting on it's own, independent of any other pc calling it. If this is is not possible I guess I'll be using cron. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 23, 2007 Share Posted September 23, 2007 You'll have to have something else calling the PHP script, it can't call itself. There are ways to make desktop apps with PHP but it's not really worth it for this. You could open the page on your browser and use refreshEvery (firefox extenstion) as a hack until you get your own linux server You could switch to MT which gives you cron jobs. Unless you're using ASP or windows only stuff, I'd use linux hosting over windows in the future. Quote Link to comment 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.