You can add this manually by creating a class that represents your command. The cli command generates next file :
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Test extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function fire()
{
//
}
/**
* Get the console command arguments.
*
* @return array
*/
protected function getArguments()
{
return array(
array('example', InputArgument::REQUIRED, 'An example argument.'),
);
}
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return array(
array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
);
}
}
put it in your commands directory (for L4 it's app/commands). Next simply add to your app/start/artisan.php file the binding for your custom command :
Artisan::add(new Test);
and that's it. This is the ideal solution when you don't need to touch your server's crontab. In case you have access to it from CP it would be the simplest solution. In case you don't have such ability, there would be now way to set the crontab to run your custom command. Hope this helps.