Download the PHP package spatie/laravel-cronless-schedule without Composer
On this page you can find all versions of the php package spatie/laravel-cronless-schedule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/laravel-cronless-schedule
More information about spatie/laravel-cronless-schedule
Files in spatie/laravel-cronless-schedule
Package laravel-cronless-schedule
Short Description Run the Laravel scheduler without relying on cron
License MIT
Homepage https://github.com/spatie/laravel-cronless-schedule
Informations about the package laravel-cronless-schedule
Run the Laravel scheduler without relying on cron
Laravel's native scheduler relies on cron to be executed every minute. It's rock solid and in most cases you should stick to using it.
If you want to simulate the scheduler running every minute in a test environment, using cron can be cumbersome. This package provides a command to run the scheduler every minute, without relying on cron. Instead it uses a ReactPHP loop.
This is how you can start the cronless schedule:
This command will never end. Behind the scenes it will execute php artisan schedule
every minute.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer. Probably you only want to use this schedule in a development environment.
Usage
This is how you can start the cronless schedule:
By default, it will run every minute.
Manually triggering a run
To perform an extra run of the scheduler, just press enter.
Using an alternative frequency
If you want to run the scheduler at another frequency, you can pass an amount of seconds to the frequency
option. Here is an example where the schedule will be run every 5 seconds.
Using another command
If you want to run another command instead of the scheduler, just can pass it to the command
option. Here is an example where another command will be run every 5 seconds.
Only run the schedule for a certain period
By default, the command will run forever. You can shorten that period by passing an amount of seconds to the stop-after-seconds
option.
In this example we'll stop the command after 5 seconds
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Credits
- Freek Van der Herten
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-cronless-schedule with dependencies
clue/stdio-react Version ^2.3
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
react/event-loop Version ^1.1.1