In order to have a script run without user interaction, you must have access to the server to set up a cronjob, or other similar functionality. This can't be done with a normal PHP script that generates a web page.
You could simulate this by storing a time stamp in a table of the last run of your script, then every page load check to see if ten minutes have elapsed. The problem with this is that it will only run if people are actually visiting your website.