memory and time intensive php task
- by Goddard
Sorry if this question has been asked before, but I couldn't find anything usable.
I'm working on a project for a client and currently I have to loop through the users table which is about 3000 records and still growing.
I have to do some calculations on a nightly basis which I am going to be using cron/php. The calculations script uses about 3.5mb of memory and takes about 1 second to run.
When loading individual users my current php setup handles this fine, but if I try and loop through the user list my php script execution time runs out.
I've read after doing some searching that I can make the page reload itself after each user calculation and just keep my previous place in the loop and this sounds like a good idea, but I wanted to hear some opinions from others that have handled similar situations and how you handled these types of tasks.
Thanks.