Yes, I think you should be using crontab for this. There is a thread on crontab and PHP that may interest you.
http://www.sitepointforums.com/showthread.php?s=&threadid=19223
Hope this helps and good luck with your script.
Laura Brandt
--
Aletia Hosting - Full-Featured, Superfast Web Hosting
PHP, MySQL, Perl, Multiple domain support and more.
200MB + 10GB Transfer at $9.95/mth
http://AletiaHosting.com - AIM: AletiaSales