Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Run Laravel schedule in docker image using supervisord #6606
This PR updates the docker image so that
Since it seems that Laravel Task Scheduling is preferred over creating various crontab entries, this should cover all of snipe-it's needs. If everyone can agree to this, then this effectively fixes issue #6344. If not, then I'll have to modify this to use
While there is a method to access the docker-set environment variables from the cron job, the whole thing seemed overkill.
I also considered forego, which was preferred over supervisor by jwilder/nginx-proxy#165. Unfortunately, it didn't work well; sending
I temporarily made the following change in my running Docker container.
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 371362442..f84a00505 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -45,7 +45,7 @@ class Kernel extends ConsoleKernel $schedule->command('snipeit:inventory-alerts')->daily(); $schedule->command('snipeit:expiring-alerts')->daily(); $schedule->command('snipeit:expected-checkin')->daily(); - $schedule->command('snipeit:backup')->weekly(); + $schedule->command('snipeit:backup')->everyMinute()->appendOutputTo("/tmp/backup.log"); $schedule->command('backup:clean')->daily(); }
After a few minutes: