- Can I use php-resque-scheduler with Laravel’s native queue system (database, sync, etc.)?
- No, this package requires Resque (a Redis-backed queue system) to function. If you’re not already using Resque, you’d need to migrate your queue driver to Resque first, which adds significant complexity. Laravel’s built-in queue drivers won’t work without custom bridging.
- Does php-resque-scheduler support recurring/cron-style jobs like Laravel’s task scheduler?
- No, this package only supports delayed jobs (one-off tasks scheduled for a future timestamp or after N seconds). Recurring jobs are not implemented and are planned for a future release, but the package is otherwise abandoned. For cron-like tasks, consider spatie/laravel-schedule instead.
- What Laravel versions does php-resque-scheduler officially support?
- The package is untested on Laravel 10+ and likely only works with Laravel 5.x due to its age (last updated in 2017). It may require manual patches for modern Laravel features like typed properties or constructor promotion. Test thoroughly if adopting for newer versions.
- How do I install and configure php-resque-scheduler in a Laravel project?
- Install via Composer: `composer require david-garcia/php-resque-scheduler`. Configure Redis for Resque (see php-resque docs), then set up a Resque worker to process scheduled jobs: `php artisan resque:work QUEUE_NAME`. Bridge Laravel jobs to Resque using a custom queue driver or middleware, as this package isn’t Laravel-native.
- Will scheduled jobs run *exactly* at the specified timestamp, or is there a delay?
- Jobs are moved from the delayed queue to Resque at the scheduled time, but execution depends on Resque worker availability. There’s no guarantee of precise timing—keep queues empty to minimize delays. This behavior mirrors the Ruby resque-scheduler, which this package emulates.
- Are there alternatives to php-resque-scheduler for delayed jobs in Laravel?
- Yes. For Laravel, consider `spatie/laravel-schedule` (for cron-like tasks) or Laravel’s native `schedule:run` command. If you’re tied to Resque, `laravel-horizon` (for monitoring) or a maintained fork of this package might be better. Avoid this if you’re not already using Resque.
- How do I monitor or debug failed scheduled jobs with this package?
- The package lacks built-in monitoring. Use the Ruby resque-scheduler web UI (compatible with this PHP port) to view delayed jobs, or manually inspect Redis queues. For failures, check Resque worker logs or implement custom error handling in your job classes. No official support exists.
- Does php-resque-scheduler work with PHP 8.1+ or Laravel 9/10?
- Unlikely. The package was last updated in 2017 and may not support PHP 8.x features (e.g., named arguments, union types). Test thoroughly in a staging environment. If you’re on Laravel 9+, evaluate alternatives like `spatie/laravel-schedule` or `laravel-horizon` instead.
- Can I use this package without Redis, or does it strictly require it?
- This package *strictly* requires Redis, as it depends on Resque (a Redis-backed queue system). There’s no fallback to other databases or caching layers. If your stack avoids Redis, this package won’t work without a full migration to Resque.
- What happens if a Resque worker crashes while processing a scheduled job?
- Jobs moved from the delayed queue to Resque are handled like any other Resque job. If a worker crashes, the job will retry based on Resque’s retry settings. However, there’s no built-in dead-letter queue or alerting—you’ll need to implement custom logic for failure recovery.