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

Steffen Kamper steffen at sk-typo3.de
Thu Jan 3 17:19:49 CET 2008


"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 






More information about the TYPO3-dev mailing list