Cron jobs and Pylons applications

I've recently been looking at how to run cron jobs for Pylons applications, both for work and for Project HQ, my open source project management application. In looking for information on how to do that, I came across this page on the Pylons wiki, which suggested either getting easy_install to create a script for you, or registering a command with Paste Script (the paster command). I couldn't really see how getting easy_install to create a script was going to help me, so I decided to look into registering a command with Paste Script.

Of course then I thought that it might be cool if my command could search through all my controllers and find a "cron" method and run that. Furthermore, the command should be flexible enough that it should allow me to tell my application where it was running this every minute, hourly, daily, weekly or whatever.

And then of course I thought about making the command as generic as possible so that others can just drop the file into their existing application, and just using it.

And thus, I present to you: croncommand.py