-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Labels
Description
- Laravel Version: 5.5.18
Description:
Trying to use not queued jobs in schedule, but getting error: Call to undefined method UpdateStatusSmsJob::onQueue(). Why? For queues has worker...
class Kernel extends ConsoleKernel
{
...
protected function schedule(Schedule $schedule)
{
$schedule->job(new UpdateStatusSmsJob)->cron('*/3 * * * *');
}
...
}I have to use this:
protected function schedule(Schedule $schedule)
{
$schedule->call(function() {
dispatch_now(new UpdateStatusSmsJob);
})->cron('*/3 * * * *');
}