(CentOS 6) Running Artisan command through crontab causes Reflection exception
<p>When I run command <code>php artisan schedule:run</code>, it runs fine. However, when I put the command into the scheduler as follows:</p>

<pre><code>* * * * * php /PATH/TO/PROJECT/artisan schedule:run &gt;&gt; /PATH/TO/PROJECT/storage/logs/scheduler.log 2&gt;&amp;1
</code></pre>

<p>I get the following error every time it runs.</p>

<pre><code>PHP Fatal error:  Uncaught ReflectionException: Class log does not exist ...
</code></pre>

<p><a href="https://stackoverflow.com/questions/34978828/uncaught-reflectionexception-class-log-does-not-exist-laravel-5-2">This question</a> shows that it's because of an error that happens early in the bootstrap process and tries to log an error before the logger is registered.</p>

<p>I can't seem to figure out where to start debugging since this is the only call stack I get:</p>

<pre><code>PHP Fatal error:  Uncaught ReflectionException: Class log does not exist in /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
Stack trace:
#0 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php(734): ReflectionClass-&gt;__construct('log')
#1 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container-&gt;build('log', Array)
#2 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container-&gt;make('log', Array)
#3 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php(849): Illuminate\Foundation\Application-&gt;make('log')
#4 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php(804): Illuminate\Container\Container-&gt;resolveClass(Object(ReflectionParameter))
#5 /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php(773): Illuminate\Container\Container in /PATH/TO/PROJECT/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 734
</code></pre>

<p>I suspect it may have something to do with permissions, however the crontab is tied to the same user who runs it manually. What is causing the original error?</p>