[TYPO3-dev] cObj in scheduler task (Extbase)
Patrick Schriner
patrick.schriner at diemedialen.de
Mon Sep 9 15:30:44 CEST 2013
Hello,
the scheduler system runs in a backend context. You can create your cObj
by simplying calling t3lib_div::makeInstance('tslib_cObj').*
While you can do that some of the most used functions in tslib_cObj rely
on being called from a frontend context. You can fake that too (e.g. using
the extension oelib, or using some hand-crafted calls), but even then you
will sometimes have "odd" behavior that you have to work around (e.g.:
conditions in typoscript don't work as expected - because there is no
frontend user, no groups...).
As all those effects are hard to predict I'd recommend writing a scheduler
task that calls an URL on your system (e.g. as an eid/ajax call), and
write the real scheduler as a frontend extension. You'd have to take care
of access restrictions and secure you eid extension script against being
called from elsewhere, but that is manageable.
Regards,
Patrick
* ContentObjectRenderer for TYPO3 > 6.0
On Mon, 09 Sep 2013 14:03:38 +0200, Stefan Franke
<stefan.franke at gmx.co.uk> wrote:
> Hello,
> is there a way to access $this->cObj in a scheduler task (Extbase!)?
>
> Thanks for your help!
>
> Kind regards,
> Stefan
More information about the TYPO3-dev
mailing list