[TYPO3-mvc] Extbase 1.3.0 and scheduler

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Feb 3 14:54:55 CET 2011


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',
	)
);

--- scheduler ------------------------------------
$configuration = array(
	'extensionName'	=> 'extkey',
	'pluginName'	=> 'CLI',
	'switchableControllerActions' => array(
		'Controller1' => array('action1'),
	)
);
$bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
$output = $bootstrap->run('', $yourConfiguration);

--------------------------------------------------

something like that.

> Or can I at least assign my Crontroller to a backend module? But how would
> the configuration for that look like?

$bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
$output = $bootstrap->callModule('M_module_signature');

Not sure if this would work like expected. But internally extbase is 
doing the very same then with plugins, only that the namespace changed 
from plugin.tx to module.tx.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list