How is it possible, if it is, to make the contents of a MySQL table/cell/column whatever update every say... twenty minutes?
Sorry if this is quite a stupid sounding question. I am new. Ignorance is my excuse.
SQL update timed?
Moderator: General Moderators
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm
-
Blackmirth
- Forum Newbie
- Posts: 6
- Joined: Sun Sep 30, 2007 12:09 pm
Not really trying to do anything, really. It was more curiosity really.feyd wrote:Cron.
But the question of what are you trying to do must be asked.
Although I am sure it will come into use.
I have never heard of Cron before, or at least only as a misspelling of corn. I also cannot find any option in my hosts' panel.
Would there be any alternative to this?
Google "cron jobs" or "crontab". It's a *nix software. If your host is windows, you'll have to use the windows task scheduler.
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.
-
Blackmirth
- Forum Newbie
- Posts: 6
- Joined: Sun Sep 30, 2007 12:09 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Something to remember is that if the results of this information doesn't need to be done on a regular basis, there's no need for a cron script. Instead the functionality could be incorporated into existing site code.
As an example, a user wished to update data about who was online at his website every few minutes. The problem was, this information was only potentially useful if someone was looking at it (on a single page.) So instead of setting up a cron job, they could have simply told the page to fetch the data on-demand.
As an example, a user wished to update data about who was online at his website every few minutes. The problem was, this information was only potentially useful if someone was looking at it (on a single page.) So instead of setting up a cron job, they could have simply told the page to fetch the data on-demand.
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
i actually do what feyd is talking about on a popular eCommerce site, and its not a trivial function such as updating a whoisonline script but a very important site function.
Although i will say, it is important to lock the table if you are doing something of this kind, or locking the file your working as i do, otherwise it can (and will) cause problems on concurrent connections.
Good luck
Although i will say, it is important to lock the table if you are doing something of this kind, or locking the file your working as i do, otherwise it can (and will) cause problems on concurrent connections.
Good luck