[Catalyst] Schedule::Cron

Matt Pitts mpitts at a3its.com
Thu Feb 14 00:35:33 GMT 2008


> -----Original Message-----
> From: Jonathan Rockway [mailto:jon at jrock.us]
> Sent: Wednesday, February 13, 2008 5:18 PM
> To: The elegant MVC web framework
> Subject: Re: [Catalyst] Schedule::Cron
> 
> * On Wed, Feb 13 2008, Will Smith wrote:
> > Is there any cron job module that I can use? I have tried
> Schedule::Cron, but
> > it gave me an error that cannot start the application.
> 
> How about running cron jobs from ... cron!  Example code:

Ok, I know there's been a lot of talk about this in the past but I
personally do not like using cron for jobs related to maintaining the
application - i.e. database cleanup, running big reports, etc.

Why? Because things like database cleanup and running big reports always
seem to turn into "email notifications 2 weeks before due" and "signup
up for email notification when this product becomes available" type
features. These types of features are very much part of the overall
application and should, therefore, in my opinion "live" close to the
application and be managed like any other piece of code.

My ideal picture of a web application is one in which you have access to
a persistent "engine" that is always running in the background which has
features like:

 - job queue (big database reports)
 - event queue (email this person when some item becomes available)
 - job runner (run a database cleanup at a regular interval)
 - messaging gateway (send/recv sms and email)

This is way overkill for most apps, but I've found times even in a
simple app that this type of framework would be nice. I realize that
Catalyst would only be the "web" part of this framework, but I think
Catalyst would be a perfect starting place for building a framework like
this.

v/r

-matt pitts 



More information about the Catalyst mailing list