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

Показать описание
#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:
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:
Комментарии