in reply to POE Sleep Process
If you don't need a new fork, with the POE::Wheel::Run, you can try this ..
Create a new inline_states in the POE::Session->createand in the method, call the delay method like thisclean_db => \&clean_db_h,
With this, your clean_db method will be called every hour.sub clean_db_h { # do all the clean needed in the db # # next clean in 3600 sec $_[KERNEL]->delay( clean_db => 3600); };
|
|---|