You have two choices:- Set up a cron job for the routine script
- Call the routine on a common page (like index.php), save a time when it's executed and check against that so you can limit the execution times
The cron job option seems to make more sense.
If you want to call the routine job from a webpage, try this method I've blogged about
:
http://fijiwebdesign.com/content/view/86/77/
It allows you to set the job without delaying the sending of the web page to the user. Thus your job can go on for minutes or even hours (if your server allows it) and the user had no idea they initiated a routine job on your server.
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
Offline 1,250 posts
since Sep 2005