Laravel Pruning Failed Jobs

To prune the records in your application's failed_jobs table, simply run the queue:prune-failed Artisan command:

php artisan queue:prune-failed

The default behavior is to prune all failed job records older than 24 hours. However, you can customize this behavior using the --hours option in the command. By providing a value for "N," only the failed job records inserted within the last N number of hours will be kept, and the rest will be deleted. For instance, executing the following command will remove all failed job records that were inserted more than 48 hours ago:

php artisan queue:prune-failed --hours=48

Software Engineer | Ethical Hacker & Cybersecurity...

Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.