php - Unable to run artisan command via cron [laravel 5.2] -
i trying run artisan command cron task keep getting errors.
in plesk have created task:
php /var/www/vhosts/domainxxx.co.uk/httpdocs/artisan schedule:run
i'm trying run queue
however error
could not open input file: php /var/www/vhosts/domainxxx.co.uk/httpdocs/artisan schedule:run
if run command php artisan schedule:run
httpdocs directory works.
i've tried loads of combinations of path , full path php nothing seems work.
what doing wrong?
fiddling created test script in httpdocs called crontest.php
echoed out status. i'm able running cron using command:
/usr/bin/php /var/www/vhosts/domainxxx.co.uk/httpdocs/crontest.php
the log shows domain user rather root user - don't know if makes difference? can see test output in notification receive.
switching to:
/usr/bin/php /var/www/vhosts/domainxxx.co.uk/httpdocs/artisan schedule:run 1
i error:
/usr/bin/php: no such file or directory
confused - error relate php or artisan (assume artisan works tst script). can please. artisan definately there :(
i had exact same issue. using simple cron pointed simple php script worked. had do, first cd correct directory. switching out own path yours, full cronjob so:
cd /var/www/vhosts/domainxxx.co.uk/httpdocs/; /usr/bin/php -q -f /var/www/vhosts/domainxxx.co.uk/httpdocs/artisan schedule:run > /dev/null 2>&1
it wasn't error laravel or artisan me, cronjob itself.
Comments
Post a Comment