试着做任务调度,但不能正常工作。我设定了时间,编写了命令,但没有运行。
这是我的命令;
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\allestates;
protected $signature = 'bot:mitsui';我的内核也在这里:
protected $commands = [
//
Commands\mitsui::class,
];
protected function schedule(Schedule $schedule)
{
$schedule->command('bot:mitsui')->everyFiveMinutes();
}我在这里错过了什么?谢谢你帮我!
发布于 2018-10-18 05:55:11
你在执行调度任务吗?您需要将此添加到您的cpanel crons或cronjob中。
php {project_path}/artisan schedule:run > /dev/null 2>&1如果没有,则将上述命令添加到cron作业中,并每分钟运行一次。
这里的步骤,如果您有根访问,
crontab -e
//Add follow line to crontab
* * * * * php {project_path}/artisan schedule:run >> /dev/null 2>&1https://stackoverflow.com/questions/52867765
复制相似问题