Using cron with PHP
Scheduling events to run at certain times can be a useful feature. You may want to backup your database or update a set of files you have cached on your server or perform any number of other resource intensive tasks. You can manually visit the page and this works fine if you have a good memory, it isn't time critical and it doesn't need to be run several times a day. If you and your task don't fit into all those categories (and even if you do but have better things to do with your time) a better alternative will be to run your script using cron. In this article I list the options for scheduling a task to run periodically and I go into detail on running a script with cron.