My website is hosted on a Plesk Onyx web server. On my development local server, I can schedule a command, and it runs perfectly every minute but when it's on my production web server, it does not work. (there is a schedule set up to run php artisan schedule:run every minute in Plesk) Probably, Laravel runs the command as following: php artisan send:email, but Plesk does not understand the command "php"... Because it uses /opt/php/7.2 or similar for that. Am I right?
If so, please help me how could I solve this issue..
If the problem is that php is not recognized as a command, you could create an alias for php on the server, or creating a symlink named php and put it in one of the $PATH-folders.
Before I dived more into this command stuff, I changed the code from command to a call function, and the email is still sent from the local server, but not from development... :( So the problem was not with the server not recognizing php as a command. Any other idea? Can I somehow see error log for this schedule?
Can you run the emailing command manually on the server (not the scheduling)? You'll see the output and if there are any errors when you do. Did you configure email for the server?