Laravel Scheduler with Cron Job
<p>I'm using larave 5.1 with php5, i try to create my cron job to remove unpaid invoice in time i want, but i testing it to print an userlog to help me know that the job is working.</p>

<p>This is my app/Console/Kernel.php</p>

<pre><code>protected $commands = [
    \App\Console\Commands\Inspire::class,
    \App\Console\Commands\RemoveUnpaidInvoice::class,
];

protected function schedule(Schedule $schedule)
{
    $schedule-&gt;command('removeUnpaidInvoice')-&gt;everyMinute();
    // $schedule-&gt;command('inspire')-&gt;hourly();
}
</code></pre>

<p>And this is my RemoveUnpaidInvoice class :</p>

<pre><code>public function handle()
{
    UserLog::create([
        'user_id' =&gt; '3',
        'title' =&gt; 'Cron Testing',
        'log' =&gt; 'Time : ' . date('H:i:s')
    ]);
}
</code></pre>

<p>After my files done, i run this command at my terminal to run my cron:</p>

<pre><code>php artisan schedule:run
</code></pre>

<p>After i run schedule artisan command, then my terminal show this message :</p>

<pre><code>Running scheduled command: '/usr/bin/php5' 'artisan' removeUnpaidInvoice &gt; '/dev/null' 2&gt;&amp;1 &amp;
</code></pre>

<p>I think it's work, then i check my database to look the userlog is created or not, and it's created, the user log is added new via cron.</p>

<p>But the problem is, i wait for one minute, and no userlog added, wait for 2 minute, 3 minute and more, there's no another userlog added to my database?</p>

<p>How to fix it? am i made a mistake??</p>