Fix Cronjobs for laravel.
The only way to publish a Cronjob for laravel is through assistance. I wish u fix it.

If what you want is to run Laravel Artisan commands such as:
> php artisan schedule:run
> php artisan route:clear
You can do so from the advanced cron editor, so long as you run the command from inside the public_html directory where artisan is found. For example, we have tested with:
> * * * * * cd public_html && php artisan route:clear > /tmp/artisan.log
And it works fine.
Let us know if this fixes your needs.
Cloudways Team
4 comments
-
Ryan commented
The following worked for me.
Go into your specific application page on https://platform.cloudways.com/apps/.
Go to "Cron Job Management" > Advanced.
Add a line like this:
* * * * * cd /home/master/applications/hhhahwsh/public_html && php artisan schedule:run > /home/master/applications/hhhahwsh/tmp/artisan.log
-
AdminCloudways (Admin, Cloudways) commented
If what you want is to run Laravel Artisan commands such as:
> php artisan schedule:run
> php artisan route:clearYou can do so from the advanced cron editor, so long as you run the command from inside the public_html directory where artisan is found. For example, we have tested with:
> * * * * * cd public_html && php artisan route:clear > /tmp/artisan.log
And it works fine.
Let us know if this fixes your needs.
Cloudways Team
-
Michael commented
Agree, is it possible to cron jobs using artisan?
-
Gabriel commented
Agree