mardi 22 septembre 2015

Laravel 5 - Sheduler not working

I am using CENT OS.. I have placed in my crontab /etc/crontab and crontab -e file.

* * * * * php /path_to_artisan/artisan schedule:run >> /dev/null 2>&1

And I have set the Scheduler to run a custom command that I have created.

protected function schedule(Schedule $schedule)
{
    $schedule->command('customCommand')
      ->everyMinute()
      ->sendOutputTo("public/data/log.txt")
      ->emailOutputTo('me@example.com');
}

But this never ever runs. However, whenever I run: php /path_to_artisan/artisan schedule:run inside terminal, the command works just fine.

I cannot seem to understand why this cron does not work, all of the other crons are working and there is no log file produced.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire