• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Issue Laravel Run CRON Jobs

lukegalea16

New Pleskian
Hi, I am trying to run a scheduled task for my Laravel project however upon testing using 'Run Now' I keep getting errors.

I've tried different commands but ultimately want to run the following (it is working on cPanel but can't figure it out on plesk):

/usr/local/bin/php /home/user_name/public_html/sub_domain_project_folder/artisan schedule:run 1>> /dev/null 2>&1

Can someone help me figure out the equivalent for plesk? Thanks!
 
Follow this guidance:

So your path to the script should looks like:
/var/www/vhosts/subscription/domain/artisan

and in arguments type: schedule:run

1>> /dev/null 2>&1 is not necessary
 
Using php artisan schedule:run you can run your artisan command at a certain time. This is a scheduled task that runs a command every minute. To make schedule:run working on your server you should add it to the cron using crontab -e .

I recently read this blog how to use Cron jobs with Laravel, might be that would help you query regarding Laravel hosting for cron job.
 
Back
Top