Just do a cron job, if you're on a Unix system.
Write the program as a PHP shell script and then set it to execute every 24 hours using crontab.
Do a man on crontab, or do a google search on how to do a cron job -- there are tutorials all over the net.
Cron is Unix's system for automatically scheduling events. Thus, your php script won't run all the time, just when it is called by crontab.
-Jonathan