Answers for "laravel schedule one time"

PHP
2

laravel scheduler every 2 hours

// AppConsoleKernel::schedule()
$schedule->command('command')->cron('0 */2 * * *');
Posted by: Guest on July-07-2020
1

laravel run schedule only on production

if (App::environment('production')) {
   $schedule->command('file:generate')
         ->daily();
   //run your commands here

}
Posted by: Guest on July-29-2021

Browse Popular Code Answers by Language