嗨,我是Laravel 公司的首席执行官
Laravel中的函数声明
protected function schedule(Schedule $schedule)
{
echo "test CRON JOB\n";
$file1 = '1.log';
$file2 = '2.log';
$schedule->command('command1')->sendOutputTo($file1);
$schedule->command('command2')->sendOutputTo($file2);
}
CRON作业(job)设置
pathToArtisan schedule:run 2>&1 >> /home/log/cron_output.log
日志(log)文件输出(cron_output.Log)
test CRON JOB
Running scheduled command: '/opt/alt/php55/usr/bin/php' 'artisan'command1 > '1.log' 2>&1 &
Running scheduled command: '/opt/alt/php55/usr/bin/php' 'artisan' command2 > '2.log' 2>&1 &
The echo in the function schedule is displayed but the ones inside my command 1 and command 2 are not.
我试过了
echo "test"; $this->info('test');
没有文件1.记录或2.记录创建位置/home/log/或内核的位置.php文件是或命令文件夹
有什么主意吗?
Thank you