Я установил cronjob в cpanel, я использую laravel 4.2. Я также решил отправить cronjob на мой адрес электронной почты, а ниже желтой части - ошибка, которую я получил по электронной почте.Настроить CronJob В CPanel Laravel
[InvalidArgumentException]
Там нет команды, определенные в "пользователь" пространства имен.
// Laravel command.php
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class CronDelFilesCommand extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'user:active';
/**
* 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()
{
echo "aaa";
}
/**
* Get the console command arguments.
*
* @return array
*/
protected function getArguments()
{
return array(
);
}
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return array(
array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
);
}
}
// команда в CPanel
* * * * * /usr/bin/php /home/project/public_html/artisan user:active > /home/project/public_html/log.txt
, что случилось? что означает ошибка?
ОБНОВЛЕНО
благодаря @KristianHareland я использовать Wget. :)
Попробуйте использовать 'wget http: // www.website.tld/path/to/file' У меня возникли проблемы с работами cPanel cron, и он решил, что это лучший способ обхода. –
@ KristianHareland не использует команду laravel больше? – hahahaha
@KristianHareland благодарит! – hahahaha