All Projects → spatie → Laravel Cronless Schedule

spatie / Laravel Cronless Schedule

Licence: mit
Run the Laravel scheduler without relying on cron

Projects that are alternatives of or similar to Laravel Cronless Schedule

Laravel Craftsman
Laravel Craftsman CLI for easily crafting Laravel assets for any project (artisan make on steroids)
Stars: ✭ 227 (-1.73%)
Mutual labels:  laravel, artisan
Heliocron
A command line application written in Rust capable of delaying execution of other programs for time periods relative to sunrise and sunset.
Stars: ✭ 152 (-34.2%)
Mutual labels:  scheduler, cron
Artisan Menu
📝 Artisan Menu - Use Artisan via an elegant console GUI
Stars: ✭ 141 (-38.96%)
Mutual labels:  laravel, artisan
Go Quartz
Simple, zero-dependency scheduling library for Go
Stars: ✭ 118 (-48.92%)
Mutual labels:  scheduler, cron
Crython
Lightweight task scheduler using cron expressions
Stars: ✭ 197 (-14.72%)
Mutual labels:  scheduler, cron
Simple scheduler
An enhancement for Heroku Scheduler + Sidekiq for scheduling jobs at specific times.
Stars: ✭ 127 (-45.02%)
Mutual labels:  scheduler, cron
Laravel Mailable Test
An artisan command to easily test mailables
Stars: ✭ 143 (-38.1%)
Mutual labels:  laravel, artisan
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-55.84%)
Mutual labels:  laravel, artisan
Rufus Scheduler
scheduler for Ruby (at, in, cron and every jobs)
Stars: ✭ 2,223 (+862.34%)
Mutual labels:  scheduler, cron
Laravel Migrate Fresh
An artisan command to build up a database from scratch
Stars: ✭ 179 (-22.51%)
Mutual labels:  laravel, artisan
Eye
Eyewitness.io package for Laravel 5 applications
Stars: ✭ 114 (-50.65%)
Mutual labels:  cron, laravel
Artisan Gui
Simple but yet powerful library for running almost all artisan commands.
Stars: ✭ 226 (-2.16%)
Mutual labels:  laravel, artisan
Totoval
An out-of-the-box artisan API web-framework written in go.
Stars: ✭ 110 (-52.38%)
Mutual labels:  scheduler, laravel
Laravel Artisan Dd
Quickly run some code via Artisan
Stars: ✭ 136 (-41.13%)
Mutual labels:  laravel, artisan
Laravel Deployer
🚀 Zero-downtime deployment out-of-the-box
Stars: ✭ 1,536 (+564.94%)
Mutual labels:  laravel, artisan
Quantum Core
⌚ Cron-like job scheduler for Elixir
Stars: ✭ 1,905 (+724.68%)
Mutual labels:  scheduler, cron
Ddns Route53
Dynamic DNS for Amazon Route 53 on a time-based schedule
Stars: ✭ 98 (-57.58%)
Mutual labels:  scheduler, cron
Cronscheduler.aspnetcore
Cron Scheduler for AspNetCore 2.x/3.x or DotNetCore 2.x/3.x Self-hosted
Stars: ✭ 100 (-56.71%)
Mutual labels:  scheduler, cron
Scheduler
Task scheduler for Golang
Stars: ✭ 171 (-25.97%)
Mutual labels:  scheduler, cron
Minicron
🕰️ Monitor your cron jobs
Stars: ✭ 2,351 (+917.75%)
Mutual labels:  scheduler, cron

Run the Laravel scheduler without relying on cron

Latest Version on Packagist Tests Psalm Total Downloads

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:

php artisan schedule:run-cronless

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.

composer require spatie/laravel-cronless-schedule --dev

Usage

This is how you can start the cronless schedule:

php artisan schedule:run-cronless

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.

php artisan schedule:run-cronless --frequency=5

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.

php artisan schedule:run-cronless --command=your-favorite-artisan-command

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

php artisan schedule:run-cronless --stop-after-seconds=5

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].