Laravel cron not working automatically

I'm working on a project in Laravel through scotch box. I am trying to automate some things through cronjobs. The problem is that my cron does not run automatticly, but when I php artisan schedule:run it runs my task perfectly.

app/commands/sendmail.php

namespace App\Console\Commands;
use Illuminate\Console\Command;
use Mail;

 class sendmail extends Command {
  protected $name = 'sendMail';
  protected $description = 'A mail has been send ';

public function fire()
{
    Mail::send([],[], function($message)  {
       //sendmail function that works...
    });    
    }
 }

app/console/Kernel.php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Facades\DB;
use App\Battle;
use Carbon\Carbon;
use App\Console\Commands\Inspire;
use App\Commands\mails;
class Kernel extends ConsoleKernel
{

protected $commands = [
    \App\Console\Commands\Inspire::class,
    \App\Console\Commands\sendmail::class,
];

protected function schedule(Schedule $schedule)
{
    $schedule->command('inspire')
             ->everyMinute();

    $schedule->command('sendMail')
        ->everyMinute();
}
}

crontab -e

# m h  dom mon dow   command
* * * * * php var/www/artisan schedule:run


ANSWERS:


The problem ended up being the use of an relative path versus absolute path.

Using the relative path defined as var/www/artisan will set the path according to present working directory. That would mean App/Console/var/www/artisan where no artisan was located.

Instead using an absolute path such as /var/www/artisan will set the directory directly to /var/www/artisan, which would be the correct location of artisan.


* * * * * php -d register_argc_argv=On /var/www/artisan schedule:run



 MORE:


 ? How do I execute php with different version through phpbrew
 ? Laravel artisan cron task not working on ubuntu
 ? Laravel artisan cron task not working on ubuntu
 ? Laravel artisan cron task not working on ubuntu
 ? Cron Jobs with Laravel 5.3 on Ubuntu 16.10 x64
 ? (Laravel 3.2) Artisan task in Cron Job not running?
 ? Laravel artisan cron not working
 ? How to run artisan command schedule:run on hosting server? (Laravel 5.1)
 ? Running a cron job. All my tests and tries were in vane
 ? Can't run a task schedule in Laravel using cron job in Godaddy