我的项目有问题。我无法在cron作业中附加输出。 这是我的代码
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel {
protected $commands = [
'\App\Console\Commands\CronEmail'
];
protected function schedule(Schedule $schedule) {
$schedule->command('app:CronEmail')->everyMinute()->appendOutputTo(public_path("cron.log"))->emailOutputTo('my email address');
}
protected function commands() {
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}
但这不是将输出附加到我的文件,也不会将输出发送到我的电子邮件地址