In a standard Laravel application, you can schedule Artisan commands in your console kernel. While that works for most projects, we took a different route in Mailcoach. Instead of scheduling commands, we’re scheduling jobs.
PHP
Laravel Deadlocks: Queue Jobs That Already Ran End Up in failed_jobs
Below MySQL 8.0.1, or on a server Laravel misreads, workers reserve jobs with a plain FOR UPDATE and can deadlock on the DELETE. One tinker line shows which lock yours use. Read more