Random Shite

Sunday, November 14, 2004

Pseudo Cron - PHP Script

Usually regular tasks like backup up the site's database are run using cron jobs. With cron jobs, you can exactly plan when a certain command is to be executed. But most homepage owners can't create cron jobs on their web server – providers demand some extra money for that.
The only thing that's certain to happen quite regularly on a web page are page requests. This is where pseudo-cron comes into play: With every page request it checks if any cron jobs should have been run since the previous request. If there are, they are run and logged. DOWNLOAD HERE.