I am working now in Laravel 5.4 and configured the queue driver as database and created the jobs migration.
Controller
public function addUser(){
$job = (new SendReminderEmail())->delay(Carbon::now()->addSeconds(200));
dispatch($job);
dd('Job Completed');
}
Queue
public function handle()
{
$input = ['name'=>'John','email'=>str_random(7),'password'=>Hash::make('general'),];
DB::table('users')->insert($input);
}
This process successfully inserting job row in jobs table. But I gave 200 seconds for execution delay. But its not firing after time reaches.
How this happening ? Is there any configuration needed more to work queues. ?