Sunday, December 30, 2007

fork() in php

I've recently developed a small facebook application, that gets movies you rated on imdb and displays them on your facebook profile.

The app relies on a cronjob that every 5 hours refreshes all the profiles of every user, that is a very slow task. I am using a web cron website, that will run a cronjob for free. The problem is that it has a 30 minutes timeout. My page takes about 3 minutes to go through all the 58 users I have (and I hope it'll grow!) so the way I trick web-cron.org is to have a script calling another script and then return. Php doesn't allow fork() when run in apache, but one can do something similar by using this hack.

How cool.
Post a Comment