title: is it possible to change the path to PHP that the Laravel task scheduler uses
body: <p>I have a Laravel 5.4 app which is on shared hosting and the cron job isn't working. I have set the command up in the kernel.php like so:</p>
  
  <pre><code>$schedule-&gt;command('eoddsmaker:get_events')
           -&gt;withoutOverlapping()
           -&gt;appendOutputTo(storage_path('logs').'/cron-get_events.log')
           -&gt;everyMinute();
  </code></pre>
  
  <p>And if I just run <code>/usr/bin/php-5.6 artisan eoddsmaker:get_events</code> from the command line it runs fine. When it gets called by the cron job though it doesn't run. This is my cron definition:</p>
  
  <pre><code>* * * * * /usr/bin/php-5.6 /var/sites/c/cyo.mydomain.com/artisan schedule:run &gt;&gt; /var/sites/c/cyo.mydomain.com/cron.log 2&gt;&amp;1
  </code></pre>
  
  <p>I can see from the cron logs on the server that this task is running every minute and everytime that it runs the following output gets added to the cron.log file:</p>
  
  <pre><code>Running scheduled command: '/usr/bin/php' 'artisan' eoddsmaker:get_events &gt; '/dev/null' 2&gt;&amp;1
  X-Powered-By: PHP/5.6.8
  Content-type: text/html; charset=UTF-8
  </code></pre>
  
  <p>So to dig a bit deeper if I look in the cron-get_events.log file that I have configured the task to send output to the following gets output every time it runs:</p>
  
  <pre><code>Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /var/sites/c/cyo.mydomain.com/artisan on line 31
  
  Parse error: syntax error, unexpected T_STRING in /var/sites/c/cyo.mydomain.com/artisan on line 31
  </code></pre>
  
  <p>Because I'm on shared hosting the default PHP version is 5.2 and I have to add a rule in the htaccess file to get it to use PHP 5.6. If I forget to add the rule I get the same error as the one that is in the cron-get_events.log so this leads me to believe that the reason the command isn't working is because when the scheduler runs it is calling the command with <code>/usr/bin/php</code> as the path to PHP rather than <code>/usr/bin/php-5.6</code></p>
  
  <p>Is there a way to configure the task scheduler to use a different path to PHP?</p>