my laravel file inside cron.d looks like MAILTO="" * * * * * www-data /usr/bin/php /app/artisan schedule:run >> /app/storage/logs/cron.log 2>&1
As per fly docs cron -f will pick any configuration in any file inside /etc/cron.d in that case it should log this configuration in cron.log file but nothing works.
Any suggestion in setting up this cron would be highly appreciated.
@ fideloper-fly @ [josephxanderson] you guys had the similar issue back then If you can shed some light.
Note that this will run the scheduler in the same VM as the web process, which means you won’t use a second VM. Depending on your app that’s a good thing or a bad thing
Most of my apps just do simple stuff like send a periodic email. There’s no need to run that in a dedicated VM. But if your scheduler does a lot of heavy work, then maybe consider putting that in a separate VM. But in that case, I would just run schedule:work.
Thanks for responding to this one.
I am using official template provided by shopify which comes with a Dockerfile you can check that out in this repo https://github.com/Shopify/shopify-app-template-php/blob/main/Dockerfile
I tried to use supercronic but that also did not worked.
In this repo their is no directory .fly/supervisor/scheduler.conf do I need to create It in my local machine then do this && cp .fly/supervisor/scheduler.conf /etc/supervisor/conf.d/scheduler.conf \
Also if my app functionality i.e frontend backend runs smooth i dont care if it runs on single machine.