Author | Thread |
|
08/07/2006 07:05:29 AM · #1 |
Is anyone able to shove me in the right direction of how to create a page on the server tha executes say once per day.... to update a table for example or something?
what would i search for on google?
|
|
|
08/07/2006 07:15:22 AM · #2 |
I believe the easiest way would be to add a CRON (sp?) entry for a linux server or a scheduled task in the Task Scheduler for a Win server.
David
|
|
|
08/07/2006 08:15:43 AM · #3 |
i have a use a hosting site, so a task scheduler is out of the question i think. :(
|
|
|
08/07/2006 08:18:59 AM · #4 |
ok on second thought, a cron job seems easy to set up with my hosting company. Where it says 'command to run'.. can i just type in a web address there?
|
|
|
08/07/2006 09:13:31 AM · #5 |
Probably not what you're wanting.
Running the URL (if it ran) would just load the page at a regular interval - not update the content. If that is what you are wanting, that's fine, but if not...
... you will need a script that updates the page contents when executed. Then just have the cron job execute the script.
Just make sure the script is something small -- the more often it is run, the smaller it needs to be. Cron jobs can bog down a server if run too often or if they run for too long.
David
|
|
|
08/07/2006 09:22:32 AM · #6 |
i was thinking of loading a web page that updated some information in a few mysql tables. I would only need to run the cron job every 6 hours or so, so i don't think it would be a problem with bogging down the server.
|
|
|
08/07/2006 09:43:55 AM · #7 |
Originally posted by David.C:
... you will need a script that updates the page contents when executed. |
If you can't set up cron jobs, you can also have your script check a "lastUpdated" table in your database and compare the stored value against whatever update interval you want to set.
That way, the update happens (if needed) when a visitor actually comes to view the page rather than just every X hours.
Dave
|
|
|
08/07/2006 02:06:31 PM · #8 |
yeah i wondered about doing that. Perhaps that would be just as good.
|
|
Home -
Challenges -
Community -
League -
Photos -
Cameras -
Lenses -
Learn -
Help -
Terms of Use -
Privacy -
Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/23/2025 09:12:06 AM EDT.