[TYPO3-german] RealURL und Cronjobs
Marco Weber
marco.weber at uni-trier.de
Tue Oct 14 19:52:39 CEST 2008
Hallo,
Also das ist bist jetzt mein Cronjob:
#!/usr/bin/php
<?php
// *****************************************
// Standard initialization of a CLI module:
// *****************************************
// Defining circumstances for CLI mode:
define('TYPO3_cliMode', TRUE);
// Defining PATH_thisScript here: Must be the ABSOLUTE path of this
script in the right context:
// This will work as long as the script is called by it's absolute path!
define('PATH_thisScript',$_ENV['_']?$_ENV['_']:$_SERVER['_']);
define('TYPO3_MOD_PATH', '../typo3conf/ext/mweberext1/cli/');
$BACK_PATH='../../../../typo3/';
$MCONF['name']='_CLI_cronjob'; // Typo3 BE USERNAME
require(dirname(PATH_thisScript).'/'.$BACK_PATH.'init.php');
// HERE you run your application!
include_once(PATH_site.'typo3/sysext/cms/tslib/class.tslib_content.php');
$cObj=t3lib_div::makeInstance('tslib_cObj');
echo $cObj->getTypoLink('hallo', 7);
echo "\n";
?>
Und das ist der OUTPUT:
mweber at testsrv:~/www/typo3conf/ext/mweberext1/cli>
/home/mweber/www/typo3conf/ext/mweberext1/cli/test.php
Fatal error: Call to a member function getPage_noCheck() on a non-object
in
/home/mweber/typo3_src-4.2.2/typo3/sysext/cms/tslib/class.tslib_content.php
on line 5196
Was mache ich noch falsch?
Grüsse
Marco
More information about the TYPO3-german
mailing list