Cron Job || Schedule Task in Laravel || Cron Job in Laravel || Task Scheduling in Laravel

preview_player
Показать описание
#TrueRealityTech #truerealitytech

Showing everyMinute() method full working. Pause video to see the codes properly.
if you upload on server then also set your full path in crontab -e for scheduling.

#important::::: in place of "////" use hyphen forward angle. see in video
In Kernel:::
protected $commands = [
\App\Console\Commands\CreateUser::class,
\App\Console\Commands\DeleteUser::class,
];
protected function schedule(Schedule $schedule)
{
$schedule////command('cronJobs:createUser')////everyMinute();
$schedule////command('cronJobs:deleteUser')////everyMinute();
}
In Command///CreateUser::::
php artisan make::CreateUser
use DB;
protected $signature = 'cronJobs:createUser';
protected $description = 'User Create Demo';
public function handle()
{
$holdData = array('LastName'//// 'Srivastav','FirstName' //// 'Rahul','Age' //// '23');
DB::table('Persons')////insert($holdData);
echo "Created\n";
}
# important Videos Below:
Рекомендации по теме
Комментарии
Автор

Hi Sir.
How can I start the schedule in windows on the localhost?
Thank You.

dot.jofficial