Docker Container - Laravel Scheduler Best Practice
Hello All,
Currently setting up a Laravel API app that uses Commands to pull data from an external API every hour in the background. That API data gets stored to a database. This app runs within a docker container that itself will live on VM.
I am currently achieving this by setting up a scheduler that auto-restarts and runs the command php artisan schedule:run
Ultimately I am just running three different commands over the span of a few hours every day. Is this considered good practice for a an app that will have a very very small user base?
I know the other option is to utilize supervisor and CRON but I feel for that amount of tasks and the scope of the project I feel its overkill.
Not sure to understand what you need ... if you have to restart some commands that could stop anyway, in production you have to use a supervisor like this one for example.
Unfortunately there are political constraints preventing me from running this as I would ultimately like. So I am trying to make the best solutions with the given constraints.
I was able to get some higher ups to relent on a policy. I am now allowed to run the CRON on the host. Running every minute php artisan schedule:run will be sufficient.