Hi Cocoon devs,
in the process of moving the Lenya scheduler to Cocoon components, I played a little bit with the cron block.
At first I tried to invoke a Lenya service from the scheduler by obtaining the service directly via the ServiceableJob's service manager. But this way I ended up with exceptions, because the request URI was empty. Originally, the service was only invoked from the web interface via flowscript.
Some questions:
1) Is it possible to initialize a cron job with the original environment information?
2) Or is it unwise to implement Contextualizable and access the request object via the ContextHelper in services which can be called from the scheduler? If yes, would that mean I should pass the request URI etc. manually?
3) Are there any general hints how to implement such a behaviour (call the same service from web interface and scheduler)?
Thanks in advance!
-- Andreas
