Execute the artisan command by giving the full path to a valid PHP binary, e.g.
/usr/bin/php/7.0/php artisan schedule:run
Obviously, swap out this path for the appropriate one on your server.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I run laravel on a managed VPS. Laravel artisan schedule:run calls php7.0 which is not present. This VPS has php70 or php. Is there a way how to instruct Laravel to call php or php70 instead?
Below the console output.
Thank you
David
Running scheduled command: '/usr/bin/php7.0'
:/data/admin4$ php artisan schedule:run
Running scheduled command: '/usr/bin/php7.0' 'artisan' db:create-summary-table > '/dev/null' 2>&1
:/data/admin4$ ls /usr/bin
awk chpst du groups mkdir patch php56 rgrep rsync ucspicat wget basename clear_console echo id mv php php70 rm scp unixclient-thin xz chdirto daemon execute ls mysqldump php54 pwd rmdir tail unxz xzcat chmod diff find mawk mysqlimport php55 realpath rssh touch unzip zip
I believe the correct-way to do it is:
update-alternatives --set php /usr/bin/php70
After that php will evaluate to /usr/bin/php70
And check your commands. Maybe the php7.0 is hard coded in the scheduler ;) (You'll probably find it in the AppServiceProvider or a ScheduleServiceProvider)
Please or to participate in this conversation.