As I mentioned recently about how I found a good solution for using lock files with PHP, I found a need to run a script at a frequency greater than the once per minute frequency that cron allows for. I was using a crude, but effective method to run my script more frequently than once a minute with cron by using the 'sleep' function.

I also touched upon the idea of using a daemon to run a PHP script.

And now I've stumbled upon a good looking solution for running scripts at sub-minute frequencies that looks nice.

The solution, called frequent-cron, allows you to run cron commands at frequencies measured in milliseconds. So rather than the maximum 1 minute frequency that cron allows, frequent-cron allows you to run a command every 500 milliseconds, for example.

I like the idea of this a lot. It basically gives your script the functionality of a daemon.

It also has it's own locking function which will block the execution of your command unless the previous call to your command has exited. Basically that's the same reason I wanted the lock file feature mentioned above. 

Anyway, I haven't installed it yet, but you can find frequent-cron here.