Do you know where your variables are? | |
PerlMonks |
Re: POE to fire off job based on date/timeby rcaputo (Chaplain) |
on Feb 16, 2011 at 02:36 UTC ( [id://888437]=note: print w/replies, xml ) | Need Help?? |
If the weekly task is relatively isolated, start another POE::Session to do it. Something like this may be sufficient if do_that_thing() doesn't take too long.
If do_that_thing() takes too long, then it may need to involve system(1,"command"). See perlport for discussion of system(1,"command") on MSWin32. For best results, use POE::Kernel's sig_child() to detect when the command has ended. And a word about fork() in POE on Windows. If you plan to do anything more than system(1,"command") in the "subprocess", then you should check out POE's Github repository for pre-release iThread-safety fixes. As you may be aware, fork() on MSWin32 is implemented in terms of iThreads, so modules must be iThread-safe to fork() there.
In Section
Seekers of Perl Wisdom
|
|