xoerk Posted June 20, 2007 Share Posted June 20, 2007 Hi, I have a question, im building an auction website and i need something like a timer/some procces that will run and check if the auction is finished and do some sql query's. But, i do need this procces to run all the time, like even if no user is logined or nobody is on the site,,something that run in the background without any connection to the site,, it will do some sql query's every minute,,, I hope that u understand me,,, :'( Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 20, 2007 Share Posted June 20, 2007 cron job But I'm not sure that's what you want. Also...they don't need to run every minute...they just need to be accurate to-the-minute....when someone tries to access them. Huge difference. Quote Link to comment Share on other sites More sharing options...
trq Posted June 20, 2007 Share Posted June 20, 2007 Sounds to me like your looking for Cron. Do a google for Cron Jobs. Quote Link to comment Share on other sites More sharing options...
xoerk Posted June 20, 2007 Author Share Posted June 20, 2007 The problem with corn job is that i need to enter the site in order for it to work,,im looking for something that will run even if nobody enter the site, I read someing that i could build something with sevlet, a program that run all the time with its own thread and do a check every min. ??? Quote Link to comment Share on other sites More sharing options...
trq Posted June 20, 2007 Share Posted June 20, 2007 The problem with corn job is that i need to enter the site in order for it to work No you dont. cron has nothing to do with a site. It is a method for calling scripts / programs / tasks periodically without any user interaction. Quote Link to comment Share on other sites More sharing options...
xoerk Posted June 20, 2007 Author Share Posted June 20, 2007 No you dont. cron has nothing to do with a site. It is a method for calling scripts / programs / tasks periodically without any user interaction. OK, so how can i stop / start the corn job if i need to, and what happends if the server die's for couple of hours..? what happens then? Quote Link to comment Share on other sites More sharing options...
trq Posted June 20, 2007 Share Posted June 20, 2007 OK, so how can i stop / start the corn job if i need to Remove it from crontab. and what happends if the server die's for couple of hours..? Any jobs that were missed will be run once the system is running again. Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 20, 2007 Share Posted June 20, 2007 what happends if the server die's for couple of hours..? what happens then? If that happens, you're screwed regardless....until the system comes back up. Quote Link to comment Share on other sites More sharing options...
xoerk Posted June 20, 2007 Author Share Posted June 20, 2007 If that happens, you're screwed regardless....until the system comes back up. u meant until some one enters the site,,,even if the server is back up, it wont start until someone enter the site and reload the corn tab up again, which mean's that if i had some unclosed auction and the time for the auction passed it wont be close/it wont send any email.... Quote Link to comment Share on other sites More sharing options...
chocopi Posted June 20, 2007 Share Posted June 20, 2007 a cron job will work when ever it is told to. If your server is down the cron job will not be able to work as the server is down. Its like a man can throw a ball at 5 oclock everyday, but if he is asleep at 5 he wont be able to throw it ~ Chocopi 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.