[Catalyst] [RFC] C::P::Scheduler - cron-like scheduling of events

Andy Grundman andy at hybridized.org
Mon Dec 12 16:40:07 CET 2005


Andrew Bramble wrote:
> I agree with the idea in principle , until a angry webmaster chops your 
> fingers off for sneaking cron type execution into a web app.

Haha, it won't upset a webmaster, in fact I don't even see how they 
would notice.  It's just a way to run periodic things like cleaning up a 
database table, sending a daily email, etc.

> Call me backwards , might this approach also support being  a harness for 
> 'real'  cron jobs.
> 
> IE
> 
> __PACKAGE__->schedule( 
> 	trigger=>'remove sessions',
> 	action=>'some forward or action to run'
> );
> 
> then in a cron
> 
> #!perl
> use MyApp
> MyApp->schedule->trigger( 'remove sessions');

I'm not so sure about this one.  If you wanted to be sure something 
triggered at the right time you could just have a cron job that hits the 
app:

0 * * * * wget -q http://www.myapp.com/

-Andy



More information about the Catalyst mailing list