title: Starting the Laravel cron job on a Mac
body: <p>I have a command scheduled in the <strong>Laravel 5.4</strong> scheduler and would like to start the Laravel cron on <strong>Mac OS X El Capitan</strong>.</p>
  
  <p>app/Console/Kernel.php</p>
  
  <pre><code>&lt;?php
  namespace App\Console;
  
  use Illuminate\Console\Scheduling\Schedule;
  use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  
  class Kernel extends ConsoleKernel
  {
      protected $commands = [
          'App\Console\Commands\GetToken'
      ];
  
      protected function schedule(Schedule $schedule) {
          $schedule-&gt;command('gettoken')-&gt;everyMinute();
      }
  
      protected function commands() {
          require base_path('routes/console.php');
      }
  }
  </code></pre>
  
  <p>My GetToken.php makes an API call and then a DB change. I believe that this is working properly, as I can run the task directly from the cli using:</p>
  
  <blockquote>
    <p>php <strong>/path/to/project</strong>/artisan schedule:run 1>> /dev/null 2>&amp;1</p>
  </blockquote>
  
  <p>To edit my cron file I use:</p>
  
  <blockquote>
    <p>env EDITOR=nano crontab -e</p>
  </blockquote>
  
  <p>I then add:</p>
  
  <pre><code>* * * * * php /path/to/project/artisan schedule:run &gt;&gt; /dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>I save with ctrl+o and exit with ctrl+x.</p>
  
  <p>Re-editing the file shows that the changes have saved.</p>
  
  <p>Running <strong>crontab -l</strong> shows the text that I entered into the crontab file.</p>
  
  <p><strong>My cron never runs.</strong> I can only get it to run once by running manually using the command I mentioned above.</p>