Assuming that you are going to run the shell script which runs the PHP command line script, you need to create a new job in crontab. Details of the syntax can be found here:
http://en.wikipedia.org/wiki/Cron#crontab_syntax
You may want to run the PHP script once every 5 to 15 minutes and experiment with the speed of response which also depends on the frequency that the Email Integration job in the Scheduled Task Manager in vBulletin has been set to run.