[TYPO3-mvc] [SOLVED] Re: Extbase 1.3.0 and scheduler

Lim Chivy chivy at web-essentials.asia
Mon Feb 14 02:57:44 CET 2011


On 2/11/2011 10:44 PM, Braulio J. Solano-Rojas wrote:
> El 10/02/2011 11:11 p.m., Lim Chivy escribió:
>> On 2/8/2011 9:58 PM, roberto blanko wrote:
>>>> How does your scheduler code look like now?
>>>>
>>>
>>> It looks like this (according to Braulio's example. The clean way
>>> according
>>> to Franz doesn't work as Braulio mentioned before):
>>>
>>> $configuration = array(
>>> 'extensionName' => 'my_ext',
>>> 'pluginName' => 'Pi1'
>>> );
>>>
>>> $_GET['tx_extension_pi1']['controller'] = 'ExportTask';
>>> $_GET['tx_extension_pi1']['action'] = 'run';
>>> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['my_ext']['modules']['Pi1']['controllers']
>>>
>>>
>>> = array(
>>> 'ExportTask' => array('actions' => array('run'))
>>> );
>>>
>>> $bootstrap = new Tx_Extbase_Core_Bootstrap();
>>> return $bootstrap->run('', $configuration);
>>
>> Hi all,
>>
>> I use the scheduler code above, and it works on the Backend when I click
>> to execute the schedler manualy, but it does not work when it is
>> executed from the crontab "CLI". Does anyone know why it works in the
>> Backend, but from crontab "CLI" not?
>
> Hello.
>
> Because the request object does not find a request method.
>
> Add $_SERVER['REQUEST_METHOD'] = 'GET'; just before the line that says
> $_GET['tx_extension_pi1']['controller'] = 'ExportTask';. It is getting
> really hacky, sorry...
>
> You could also try with $_SERVER['REQUEST_METHOD'] = 'CLI', but I do not
> know what are the effects.
>
> Bests,
>
> B.
>

Hi Braulio,

Thanks for your help. Now, it works with the "CLI" cron job.

Bests,
Chivy




More information about the TYPO3-project-typo3v4mvc mailing list