How to run laravel 5.2 artisan command on cron job on hostgator hosting server cpanel?
<p>I have created an example schedule job to run after a specific time in Laravel 5.2. And this is working fine on <code>localhost</code> through <code>artisan</code> command.</p>

<p>I am running this command on local server:
<code>php artisan Demo:Cron</code></p>

<p>Now I am adding this task in cPanel's advance option cron job on HostGator hosting server. But it is not working. </p>

<p>This is the command I am trying:</p>

<p><code>cd /home/pofindia/public_html/beta-var1/ &amp;&amp; /usr/local/bin/php artisan Demo:Cron</code></p>

<p>Php version: 5.4 default.
And here is my example file</p>

<pre class="lang-php prettyprint-override"><code>&lt;?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use DB;

class DemoCron extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'demo:cron';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        DB::table('items')-&gt;insert(['name'=&gt;'hello new']);
        $this-&gt;info('Demo:Cron Cummand Run successfully!');
    }
}
</code></pre>