2DaysAway Posted December 28, 2007 Share Posted December 28, 2007 I own a game where I use php crons to update game ranks every five minutes and issue turns every ten minutes. These work fine. What happens though when you view a ranks page the time stops. I would like to see the time to continue to run down. I'm wondering if there is a script that could implement this. I'm thinking a javascript using the server crons. Any ideas or is this a lost cause? Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/ Share on other sites More sharing options...
btherl Posted December 28, 2007 Share Posted December 28, 2007 Why does the time stop when you view a ranks page? Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/#findComment-424574 Share on other sites More sharing options...
2DaysAway Posted December 28, 2007 Author Share Posted December 28, 2007 It doesn't neccessarily stop. Technically the time continues, its just when you view the page it looks as if time stops. I would like to see the time continue to countdown. Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/#findComment-424761 Share on other sites More sharing options...
revraz Posted December 28, 2007 Share Posted December 28, 2007 Does any page at all show the time counting? Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/#findComment-424766 Share on other sites More sharing options...
2DaysAway Posted December 28, 2007 Author Share Posted December 28, 2007 you would have to keep refreshing the page to show the current time. this is the script I use. <?=countup($site["cron5min"]+300)?> Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/#findComment-424768 Share on other sites More sharing options...
btherl Posted December 29, 2007 Share Posted December 29, 2007 Another option is to use independent javascript that is sychnronized with your cron jobs. For example, if your cron runs every 10 minutes, and your script is executed at 5:03, then you would initialize the javascript with 7 minutes to go. It would then count down to the next cron run without needing to communicate in any way with the cron job. Quote Link to comment https://forums.phpfreaks.com/topic/83438-looking-for-a-continous-countdown-script-using-server-crons/#findComment-425029 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.