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?
looking for a continous countdown script using server crons.
Moderator: General Moderators
Yes, you could feed the current time to a javascript function and let it count down for you. However, as javascript is client side and php (and the cron executing the php scripts) are server side, the javascript countdown would not be dead on accurate. It would only provide an idea of how much time would be left.
Another idea would be an AJAX script to pull the time every (x) seconds. This is a much better idea, as it will be guaranteed to be accurate, since it is pulling data straight from the server. However, since you're running these scripts on cron jobs, you may be concerned about server load? If you're not concerned about server load, go with the AJAX. Otherwise, javascript.
Another idea would be an AJAX script to pull the time every (x) seconds. This is a much better idea, as it will be guaranteed to be accurate, since it is pulling data straight from the server. However, since you're running these scripts on cron jobs, you may be concerned about server load? If you're not concerned about server load, go with the AJAX. Otherwise, javascript.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.