When I run 'php artisan schedule:run' in terminal, it's doing what is exptected, but when I configure my crontab to execute it automatically it has no effect. My code in Kernel.php is:
$schedule->call(function () {
$example=Example::orderBy('updated_at', 'asc')->limit(1)->first();
$example->touch();
})->everyMinute();
and in crontab -e I put
* * * * * php /path/to/laravel/project schedule:run 1>> /dev/null 2>&1
I tried executing other commands in the crontab file and the other commands were working. So I suppose that could be something with php but I don't have any output to know whats the problem.
Any idea on how to figure out the problem?