On Fri, May 06, 2005 at 03:14:18PM +0200, Bas Schulte wrote:
> Hi,
>
> On 30-apr-05, at 1:27, Rodney Rindels wrote:
>
> >But. Since I Noticed Rocco mentions more than once the fact that some
> >things are better left to cron.. I Thought I would get the more
> >experience POE users opinion on this one.
>
> You can combine cron and POE nicely, I just did it in a scheduler-like
> application. It's a POE app with delayed events etc.. It gets it's
> schedule from a database table, those entries are converted to cron
> lines (e.g. "*/5 1 0 0 0"), these lines are fed to
> DateTime::Event::Cron that calculates the timestamp of the "next
> interesting" datetime.
>
> Every 5 or so seconds, I re-scan the database tables to see if there
> were schedule changes, and if so, adjust that "next interesting"
> datetime.
>
> When the "next interesting" time has come, I start the specified task
> (in my case, I open a tcp/ip network connection to a local control
> server, also a POE app, and tell it to do something.
>
> It beats the hell out of regular cron, flexibility-wise ;)
Sounds nice! Have you seen POE::Component::Cron?
--
Rocco Caputo - http://poe.perl.org/
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|