2 months ago
I am running a Laravel project with a custom domain.
After setting a cron schedule and adding a php artisan ~
command to the Custom Start, deploying the project results in a "Host Error" from Cloudflare.
What is the correct procedure for setting up cron jobs in a Laravel project in this case?
3 Replies
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
2 months ago
Been wasting more time with Cloudflare than it is actually sane, so here we go: Just leave your Laravel web service doing its normal thing (Nginx + PHP or whatever), don’t shove a while-loop cron in there or Cloudflare freaks out lol. Instead, hop into Railway’s Cron tab, slap in * * * * *
and point it at php artisan schedule:run
. Just pick the same image and voilà.
2 months ago
It was a basic mistake.
I created a new service specifically for the cron job, separate from the service with the custom domain, and simply set up the cron there — and it worked.
Status changed to Solved itsrems • 2 months ago