title: Laravel : how How to send Email using Cron job on Windows?
body: <p>I want to do Laravel cron job on windows.For that I have done the following steps from the <a href="http://laravel-bd.blogspot.com/2016/06/how-to-send-email-using-cron-job-in-laravel.html" rel="nofollow">Tutorial</a> But cron job doesn't work in my application.</p>
  
  <p>First I have crated a command:</p>
  
  <pre><code>php artisan make:console SendEmails --command=emails:send
  </code></pre>
  
  <p>Then I have write the code handle() :</p>
  
  <pre><code>public function handle(Request $request)
  
      {
  
          $user=User::all();
  
  
              Mail::queue('send', ['user' =&gt; $user], function($m) use ($user)
  
                  {
  
                      foreach ($user as $user) {
  
                          $m-&gt;to($user-&gt;email)-&gt;subject('Email Confirmation');
  
                      }                     
  
                  });
  
      }
  </code></pre>
  
  <p>Then I have added the following line in command array:</p>
  
  <pre><code>Commands\SendEmails::class,
  </code></pre>
  
  <p>And added the following line on protected schedule function():</p>
  
  <pre><code>$schedule-&gt;command('SendEmails')
  
                   -&gt;everyMinute();
  </code></pre>
  
  <p>So it's should send the email everyMinute. But nothing send.Added to say when i run the command, it's send email immediately for there's no problem of email sending.</p>
  
  <pre><code>php artisan emails:send
  </code></pre>