Hi, I have added the cron job for artisan:run in my hestiacp cron tab and it is not working. Following codes I have tried so far,
-
/usr/bin/php8.1 /home/admin/web/domain.com/public_html/domain/artisan schedule:run
-
/usr/bin/php /home/admin/web/domain.com/public_html/domain/artisan schedule:run
-
php /home/admin/web/domain.com/public_html/domain/artisan schedule:run
-
php -q /home/admin/web/domain.com/public_html/domain/artisan schedule:run
Please guide me to fix this issue.
eris
2
I use my self:
cd /home/client/web/client.com/public_html/folder/ && /usr/bin/php8.3 artisan schedule:run
1 Like
No, It is not working @eris
eris
5
What happens if you login via ssh and run:
cd /home/client/web/client.com/public_html/folder/ && /usr/bin/php8.3 artisan schedule:run
Please make you use the correct php version
output:
[2024-11-13T17:49:53+05:30] Running scheduled command: ‘/usr/bin/php8.1’ ‘artisan’ get:access_token_user > ‘/dev/null’ 2>&1
[2024-11-13T17:49:53+05:30] Running scheduled command: ‘/usr/bin/php8.1’ ‘artisan’ get:access_token_driver > ‘/dev/null’ 2>&1
I have set php8.1 as the system version as well as for the domain.
eris
9
You didn’t run in in CLI via ssh …
Also remove /dev/null 2>&1 it deletes any debugging shit
Refer to the screenshot above.
But the result is not showing in DB? why?