• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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