[TYPO3-mvc] Scheduler & ext_base?

Braulio J. Solano-Rojas braulio at solsoft.biz
Wed Feb 2 22:31:42 CET 2011


El 28/07/2010 08:31 p.m., Braulio J. Solano-Rojas escribió:
 > Hi Michael.
 >
 > El 26/07/2010 09:01 a.m., Michael Feinbier escribió:
 >> Hi Braulio,
 >>
 >> I am using Extbase from a scheduler task like this:
 >>
 >> [Snip]
 >>
 >> This works fine for me but as already mentioned this is just a kind
 >> of hack because it is no "real" HTTP-Request.
 >
 > Thank you! (¡Gracias!)
 >
 > [Snip]

Well, that solution by Michael Feinbier does not work anymore with the 
new version of extbase.  Had to change to something like this:

class Tx_Extension_Task_EmailTask extends tx_scheduler_Task {
	public function execute() {
		$configuration = array(
			'extensionName' => 'Extension',
			'pluginName' => 'Pi1'
		);
		
		$_GET['tx_extension_pi1']['controller'] = 'Controller';
		$_GET['tx_extension_pi1']['action'] = 'notify';
	 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['Extension']['modules']['Pi1']['controllers'] 
= array(
			'Controller' => array('actions' => array('notify'))
		);

		$bootstrap = new Tx_Extbase_Core_Bootstrap();
		$bootstrap->run('', $configuration);
		return TRUE;
	}
}

I suppose this will be considered as "hacky" too.  Anyway, hopes this 
helps someone.

Bests,

B.

P.S.:  This is an old thread:
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-July/005895.html



-- 
Director General
Solsoft de Costa Rica
Inteligencia Artificial... en su Negocio
http://solsoft.biz/

"The two parties which divide the State, the party of Conservatism and 
that of Innovation are very old, and have disputed the possession of the 
world ever since it was made ... Now one, now the other gets the day, 
and still the fight renews itself as if for the first time, under new 
names and hot personalities ... Innovation is the salient energy; 
Conservatism the pause on the last movement."

Ralph Waldo Emerson



More information about the TYPO3-project-typo3v4mvc mailing list