httpwebwitch - 6:14 pm on Jul 8, 2011 (gmt 0)
Modulo is an great weapon you can use liberally in many situations.
I assume you're going to put this thing on a cronjob, eh?
Another way to accomplish your goal - which doesn't require any math - is to start with the number "0" in a text file on the server. Once per minute, read it, and call it $previous. Query SQL to get the ID of the next product, and call it $next. Do stuff to it. Then write $next into the text file. Then the next time the cron runs (once per minute), get the $previous, and repeat.
Use file_get_contents() and file_put_contents()
Here I'm assuming your 10,000 products are in a database.
$query = "SELECT * FROM products WHERE id > ".$previous." ORDER BY id LIMIT 1";
A simple pointer like that will prevent you having to write some algorithm to figure out which product corresponds to which minute of the week, you can add and remove products without harming the script, and it won't fail if your product ID's aren't strictly sequential.