.. include:: ../Includes.txt .. _extbase_command_controller_about: Command controllers =================== Command controllers make logic available at the command line and in the scheduler backend module. They can provide functionality for recurring tasks like mail queues, cleanups, imports and more, which is then available for administrators and regular backend users. .. _extbase_command_controller_creating: Creating command controllers ---------------------------- A `CommandController` needs to be located at :file:`Classes/Command/`. This following simple example meets the minimum requirements. :file:`Classes/Command/SimpleCommandController.php`:: ] ARGUMENTS: --required OPTIONS: --optional .. _extbase_command_controller_documentation: Command documentation --------------------- So far you have provided information on what the command and its arguments. To help others, you may want to provide further information within the PHPDoc that is to be displayed on the commandline:: /** * This is a short description. * * This will be further information available to everyone asking for it * from the cli. * * @param int $required This is an required argument. * @param bool $optional And this is an optional argument. */ public function argumentsCommand($required, $optional = false) { } The information is shown when calling `typo3/cli_dispatch.phpsh extbase help simple:arguments`: .. code-block:: none This is a short description. COMMAND: example:simple:arguments USAGE: /typo3/cli_dispatch.phpsh typo3/cli_dispatch.phpsh extbase simple:arguments [] ARGUMENTS: --required This is an required argument. OPTIONS: --optional And this is an optional argument. DESCRIPTION: This will be further information available to everyone asking for it from the cli.