Bas Schulte wrote:
I think this idea has some merit for the complex timing issues I'm going to have. I can also store run state in the database then and keep "like" events from firing on top of each other.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 ;)
Cheers,
Bas.
Thanks......
Rodney
