[TYPO3-english] question about cli

Jigal van Hemert jigal.van.hemert at typo3.org
Sat Sep 29 07:27:47 CEST 2012


Hi,

On 29-9-2012 5:50, tom liu wrote:
> I run a cli through ssh,
> /home/need/public_html/test/typo3/cli_dispatch.phpsh car
>
> But it does not work. It did not do what it supposed to do. So is there any
> error log I can look at in order to debug?

If you run it from the command line you can simply add code which 
outputs debug info (echo, var_dump, etc.). The output will be shown in 
your terminal window.

In order for the script to work the way you called it, make sure that:
- cli_dispatch.phpsh is executable
- the path to php inside cli_dispatch.phpsh is correct *)

*) if you call it like:
/path/to/php /home/need/public_html/test/typo3/cli_dispatch.phpsh car
then you don't need a correct path to php inside cli_dispatch.phpsh. 
This method is the preferred way when using cli scripts as cron jobs.

For quite some time there is of course the Scheduler module in TYPO3. 
This makes it way easier to manage tasks which have to be performed 
regularly. There is an easy interface for admins to set up and manage 
the tasks and you only need to configure a single cron job which runs 
the scheduler itself.
Inside the scheduler sysext are a number of predefined and example tasks 
which you can use as inspiration for creating your own tasks.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list