On linux set the a cron to execute
"php -q yourFileName.php"
On windows you can set windows task scheduler to run the same command. You might have to put that command into a bat file and have event scheduler run that bat file since event scheduler has some problems (or atleast it did when I used it).