Queue delay , sending an email at a certain time
<p>What want to achieve is to send and email , at a chosen time (by the user)
so my approach was to calculate the time difference then make that the delay time on a queue.</p>

<p>but it seems it's not working as i expect 
all emails get delivered together and not at the right time</p>

<p><strong>Controller</strong></p>

<pre><code>    public function notifyme($add)
{

    $created = Carbon::now()-&gt;addMinutes($add);
    $now = Carbon::now();

    $days = 1440*$created-&gt;diff($now)-&gt;days;
    $hours = 60*$created-&gt;diff($now)-&gt;h;
    $minutes = $days + $hours + $created-&gt;diff($now)-&gt;i;

    $user = Auth::user();


    $user-&gt;notify((new notifyme($user))-&gt;delay($minutes));

     return redirect('/notif');
}
</code></pre>

<p><strong>route</strong></p>

<pre><code>Route::get('notifyme/{add}', 'HomeController@notifyme');
</code></pre>

<p><strong>.env</strong> </p>

<pre><code>QUEUE_DRIVER="database"
</code></pre>

<p>im using laravel 5.3 so the <code>notifyme</code> controller implements the ShouldQueue contract.</p>

<p>now when i run <code>php artisan queue:work</code> or <code>php artisan queue:listen</code> and test this
the email sending is delayed, but when i do it again, (while the first job is still delayed) both emails get sent together immediately or after sometime (not at the right time $add)</p>

<p>Any idea what is wrong here? 
is there a better approach? like using a schedule? or what?</p>