Skip to content

Instantly share code, notes, and snippets.

@AlphaRomeoMike
Created March 8, 2022 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlphaRomeoMike/af87bb43931e5158d777c426c69b6271 to your computer and use it in GitHub Desktop.
Save AlphaRomeoMike/af87bb43931e5158d777c426c69b6271 to your computer and use it in GitHub Desktop.
Laravel Cron Console Kernal file
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->everyMinute();
$schedule->command('generate:bill')->everyMinute()->sendOutputTo('/tmp/cron.log');
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment