spatie/laravel-short-schedule
Run Laravel Artisan commands at sub-minute intervals (every second or even 0.5s). Adds a short-scheduler powered by a ReactPHP event loop, running separately from schedule:run so high-frequency tasks don’t block or get delayed.
Adopt if:
schedule:run cannot handle.Look elsewhere if:
"This package lets us run critical background tasks at sub-second intervals—think real-time system checks, gaming leaderboards, or fraud detection—without overloading our servers. It’s like upgrading from a stopwatch to a nanosecond timer for automated processes. The cost? Minimal: just a persistent process (like a background service) to keep it running. We avoid vendor lock-in by using open-source tech, and it integrates seamlessly with our existing Laravel stack. Early adopters like [hypothetical company] use this to cut latency in [specific use case], saving [X] in operational costs."
*"Laravel’s scheduler tops out at 1-minute intervals, but we need to run [specific task, e.g., ‘cache invalidation every 300ms’] without blocking other jobs. This package uses ReactPHP to spin up a non-blocking event loop that fires commands in parallel—no more sequential delays. Key benefits:
when(), between(), or environments() filters like native scheduling.--lifetime.
Tradeoff: Requires a dedicated process, but the tradeoff is worth it for [use case]. Let’s prototype this for [specific feature] and measure impact on [latency/metrics]."**"This adds a ReactPHP-powered scheduler to run Artisan commands at sub-minute frequencies. To deploy:
composer require spatie/laravel-short-schedule.app/Console/Kernel.php (add shortSchedule() method).php artisan short-schedule:run (persist with Supervisor).
Gotchas:--lifetime (e.g., 60) to auto-restart workers and avoid leaks.onOneServer() to avoid duplicate executions in multi-server setups."*How can I help you explore Laravel packages today?