Vishaal
221
4
Servers

Laravel artisan cron task not working on ubuntu 18.10

Posted 3 months ago by Vishaal

Hello I have enabling the cron feature for Laravel on Ubuntu 18.10 on Vultr VPS server.

I have added the cron task to the cron jobs list using the command

    crontab -e

Then I have added the command listed in the laravel documentation

    * * * * *       cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1

I have made sure that cron is running and I can see that the task is running if I run

    sudo grep -i cron /var/log/syslog|tail -3

Which returns

    May 20 20:56:01 HiRe-Pro-Web CRON[1819]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
    May 20 20:57:01 HiRe-Pro-Web CRON[1862]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
    May 20 20:58:01 HiRe-Pro-Web CRON[1898]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)

manual runs fine

php artisan schedule:run

Does anyone have any suggestions where I'm going wrong here.

Please sign in or create an account to participate in this conversation.