{"repo":"spatie/laravel-short-schedule","free":true,"listed":false,"github":"https://github.com/spatie/laravel-short-schedule","clone":"git clone https://github.com/spatie/laravel-short-schedule.git","description":"Schedule artisan commands to run at a sub-minute frequency","language":"PHP","stars":657,"topics":["php","laravel","schedule","sub-minute"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Schedule artisan commands to run at a sub-minute frequency Laravel's native scheduler allows you to schedule Artisan commands to run every minute. If you need to execute something with a higher frequency, for example every second, than you've come to the right package. With laravel-short-schedule installed, you can do this: Alternatively, you could add this to the shortSchedule method in your console kernel: How it works The short-schedule:run command starts a single long-running process powered by a ReactPHP event loop. That process is entirely separate from Laravel's native scheduler ( schedule:run ), so your short scheduled tasks never delay, or get delayed by, your regular schedule. Inside the loop, every scheduled command gets its own periodic timer. When a timer fires, the command is launched as an independent background process using the non-blocking start() method of Symfony\\Component\\Process . The loop does not wait for that process to finish. It immediately continues handling the other timers. Because each command runs in its own process, a slow task does not hold up the rest of your short schedule. This is a notable difference with the native sub-minute scheduler, which by default runs tasks sequentially in the foreground, where a single long-running task can delay every task defined after it. A few things do run inside the loop itself, and so will block it when they are slow: - the constraints you add (such as when and between ), which are evaluated on every tick ","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-short-schedule/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}