[TYPO3-mvc] Extbase 1.3.0 and scheduler
Braulio J. Solano-Rojas
braulio at solsoft.biz
Thu Feb 3 16:20:59 CET 2011
El 03/02/2011 07:54 a.m., Franz Koch escribió:
> Hey Roberto,
>
>> thanks for your responses. But in order for that to work, my Task
>> Controllers and Actions must be assigned to a Frontend Plugin first,
>> right?
>> Since tasks are to be run within a CLI context only, I don't think
>> this is quite reasonable.
>
> You don't have to add a selectable FE plugin, all you would have to do
> is to configure the allowed controllers and actions for a plugin - that
> doesn't mean this plugin has to be used from the FE though.
>
> --- localconf ----------------------------------
> Tx_Extbase_Utility_Extension::configurePlugin(
> $_EXTKEY,
> 'CLI',
> array(
> 'Controller1' => 'action1,action2',
> 'Controller2' => 'action1',
> ),
> array(
> 'Controller1' => 'action1,action2',
> 'Controller2' => 'action1',
> )
> );
When one runs a scheduler task with bootstrap it does not find that
configuration. That is why I added (just before bootstrap):
$_GET['tx_extensionname_pi1']['controller'] = 'ControllerName';
$_GET['tx_extensionname_pi1']['action'] = 'actionname';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['Extensionname']['modules']['Pi1']['controllers']
= array(
'Controllername' => array('actions' => array('actionname'))
);
Also plugin name Pi1 is what worked for me. Notice that this is
'modules', extbase knows that this is running in backend. I tested this
with manual run. I don't know if with cron this will change.
>
> --- scheduler ------------------------------------
> $configuration = array(
> 'extensionName' => 'extkey',
> 'pluginName' => 'CLI',
> 'switchableControllerActions' => array(
> 'Controller1' => array('action1'),
> )
> );
switchableControllerActions won't work either (I don't know if it is a
bug, it just does not work like before when using dispatch)... See the
code above and the code in my recent post with subject "Re: [TYPO3-mvc]
Scheduler & ext_base?".
> $bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
> $output = $bootstrap->run('', $yourConfiguration);
>
> --------------------------------------------------
>
> [Snip]
>
Bests,
B.
More information about the TYPO3-project-typo3v4mvc
mailing list