[TYPO3-dev] HowTo: Running a cronscript using TYPO3 with CLI

Steffen Ritter info at rs-websystems.de
Thu Jan 3 20:15:45 CET 2008


Steffen Kamper schrieb:
> "Ernesto Baschny [cron IT]" <ernst at cron-it.de> schrieb im Newsbeitrag 
> news:mailman.1.1199376508.29585.typo3-dev at lists.netfielders.de...
>> Steffen Kamper wrote: on 03.01.2008 16:54:
>>
>>> So little additional question, how can I access commandline parameters? 
>>> e.g.
>>> i want to start my script this way
>>> /abspath/typo3/cli_dispatch.phpsh mysscript -f 100
>> You pass $_SERVER['argv'] to your main() method of your class and it can
>> handle the command line the way it wishes. AFAIK we don't have any
>> getopt()-like functionality in TYPO3-core, so you have to do it your own
>> way.
>>
>> Cheers,
>> Ernesto
> 
> I found something usable:
> t3lib_cli::cli_getArgArray($option,$argv)
> 
> i will test a bit with this and may be make a demo-ext, thx for your hints.
> 
> vg  Steffen 
> 
> 
Fascinated by your discussion i tried the hole afternoon to create an 
own CLI Script using the cli_dispath.php.
Against the information in 
typo3/sysext/lowlevel/HOWTO_clean_up_TYPO3_installations.txt it does not 
work as written in this Document. At the moment I'm going throug all 
files which are included while CLI and checking what happens.
When finished I will report what I had to do, and publish some kind of 
"Howto"...

mfG

Steffen





More information about the TYPO3-dev mailing list