Job/Schedule Command in Laravel
1. app/console/kerne.php protected $commands = [ SalesClaimConfirmation::class, ]; protected function schedule(Schedule $schedule) { // One way $schedule->command('job:sales-claim-confirmation')->everyMinute(); // Another way $schedule->call('App\Console\Commands\SalesClaimConfirmation@handle')->everyMinute(); } 2. app/console/commands/SalesClaimConfirmation.php // The name and signature of the console command. protected $signature = 'job:sales-claim-confirmation'; // The console command description. protected $description = 'Agent sales claim confirmation'; // Execute the console command. public function handle() { $this->userDefineFunction(); }