• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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