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

Andy Grundman andy at hybridized.org
Tue Dec 13 15:30:40 CET 2005


Adam Herzog wrote:
> I wonder if the stat call to the YAML on every request would become too 
> expensive... maybe you could provide either a) an option to set how 
> often to check (a built in schedule, I suppose), or b) the ability to 
> programatically force a reload.

Stat calls are cheap, TT makes a stat call for each template used in a
request for example.

> So, I guess I'd like to see schedule() take 'at', 'event', and 
> 'auto_run'. auto_run being a boolean that specifies whether that event 
> is run on every event, or only when the specified param 
> (?run_schedule=1) is entered. Of course, then we get back into the issue 
> of security, I suppose. Hrm. So... I guess there would have to be 
> something like

Ah now I see what you're getting at.  Sounds like a good idea, all 
long-running tasks could be set auto_run = 0 but would still run using 
the defined schedule, assuming the real cron job hits often enough.

> __PACKAGE__->config->{scheduler}->{hosts_allow} = [ '127.0.0.1', 
> 'oth.er.i.p' ];

Yep, exactly what I had in mind.

-Andy



More information about the Catalyst mailing list