pm4dev / pause_jobs
There is no license information available for the latest version (1.0.0) of this package.
Pause Jobs
1.0.0
2025-07-18 18:12 UTC
README
A Laravel package that allows you to pause/disable specific jobs without modifying the job code itself.
Installation
- Install the package via Composer:
composer require pm4dev/pause_jobs
- The package will auto-register itself with Laravel.
How it works
This package adds middleware to Laravel's job bus that checks if a job is in the disabled list before executing it. If a job is disabled, it will be skipped and logged.
Available Commands
Disable a Job
php artisan jobs:disable "App\Jobs\YourJobClass"
Enable a Job
php artisan jobs:enable "App\Jobs\YourJobClass"
List Disabled Jobs
php artisan jobs:list-disabled
Enable All Jobs
php artisan jobs:enable-all
Or force enable without confirmation:
php artisan jobs:enable-all --force
Usage Examples
Disable a specific job
php artisan jobs:disable "App\Jobs\SendEmailJob"
Enable a previously disabled job
php artisan jobs:enable "App\Jobs\SendEmailJob"
Check what jobs are currently disabled
php artisan jobs:list-disabled
Enable all jobs at once
php artisan jobs:enable-all
Storage
The package stores the list of disabled jobs in storage/app/disabled_jobs.json
. This file is automatically created and managed by the package.
Logging
When a job is skipped due to being disabled, it will be logged with:
- Laravel's log system (
Log::info
) - PHP's error log (
error_log
)
The log message format is: SKIPPED JOB: {JobClassName}
Notes
- Job class names must be fully qualified (e.g.,
App\Jobs\YourJobClass
) - The package validates that the job class exists when disabling
- Disabled jobs are completely skipped and not executed
- The disabled jobs list persists across application restarts