I'm making module for a PHP ecommerce system. This system database have a 2000 products. I need to update all products(some values) in a one day. I dont want to update all products one time.
I try update every period 100 products when the visitor open some page (module is hooked init - header). Here i want to give time limit. If this 100 product don't update in 20 seconds make break and write last updated product id to database.
How can I do this? How this function know 20 seconds later break?