4_2_command(スケジューラ)の使い方 - hpscript/laravel GitHub Wiki

make:command

$ php artisan make:command TestCommand

app/Console/Commands/TestCommand.php

protected $signature = 'command:testcommand';
public function handle()
    {
        //
        echo "test command execute!";
    }

app/Console/Kernel.php

 protected $commands = [
        //
        \App\Console\Commands\TestCommand::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        // $schedule->command('inspire')
        //          ->hourly();
        $schedule->command('command:testcommand')->daily();
    }

command実行

$ php artisan list; $ php artisan command:testcommand;

$ crontab -e