I'd probably run it as a scheduled task on windows.
For linux do man cron
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
what i like to do is put some ajax on the main page of my website so that the php code will execute every time someone accesses your page and do the garbage collection you need. i don't know if this would work for you but i works quite well for me.
kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194