{"id":14109423,"url":"https://github.com/spatie/laravel-cronless-schedule","last_synced_at":"2025-05-16T07:05:39.876Z","repository":{"id":45718978,"uuid":"271198306","full_name":"spatie/laravel-cronless-schedule","owner":"spatie","description":"Run the Laravel scheduler without relying on cron","archived":false,"fork":false,"pushed_at":"2025-02-17T09:36:22.000Z","size":54,"stargazers_count":371,"open_issues_count":0,"forks_count":15,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-10T15:53:21.669Z","etag":null,"topics":["artisan","cron","laravel","php","scheduler"],"latest_commit_sha":null,"homepage":"https://spatie.be/open-source","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"spatie","custom":"https://spatie.be/open-source/support-us"}},"created_at":"2020-06-10T06:35:40.000Z","updated_at":"2025-05-07T21:40:29.000Z","dependencies_parsed_at":"2024-06-18T17:11:20.742Z","dependency_job_id":null,"html_url":"https://github.com/spatie/laravel-cronless-schedule","commit_stats":{"total_commits":56,"total_committers":7,"mean_commits":8.0,"dds":0.2857142857142857,"last_synced_commit":"84560fffe7afee23448fe3ba59d2d23c9b67ea4e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-cronless-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-cronless-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-cronless-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-cronless-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/laravel-cronless-schedule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485062,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","cron","laravel","php","scheduler"],"created_at":"2024-08-14T10:02:17.984Z","updated_at":"2025-05-16T07:05:38.619Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":["https://github.com/sponsors/spatie","https://spatie.be/open-source/support-us"],"categories":["PHP"],"sub_categories":[],"readme":"# Run the Laravel scheduler without relying on cron\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-cronless-schedule.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-cronless-schedule)\n![Tests](https://github.com/spatie/laravel-cronless-schedule/workflows/Tests/badge.svg)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-cronless-schedule.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-cronless-schedule)\n\n[Laravel's native scheduler](https://laravel.com/docs/master/scheduling) relies on cron to be executed every minute. It's rock solid and in most cases you should stick to using it.\n\nIf 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](https://reactphp.org) loop.\n\nThis is how you can start the cronless schedule:\n\n```bash\nphp artisan schedule:run-cronless\n```\n\nThis command will never end. Behind the scenes it will execute `php artisan schedule` every minute. \n \n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/laravel-cronless-schedule.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/laravel-cronless-schedule)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe 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](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Installation\n\nYou can install the package via composer. Probably you only want to use this schedule in a development environment.\n\n```bash\ncomposer require spatie/laravel-cronless-schedule --dev\n```\n\n## Usage\n\nThis is how you can start the cronless schedule:\n\n```bash\nphp artisan schedule:run-cronless\n```\n\nBy default, it will run every minute. \n\n### Manually triggering a run\n\nTo perform an extra run of the scheduler, just press enter.\n\n### Using an alternative frequency\n\nIf 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.\n\n```bash\nphp artisan schedule:run-cronless --frequency=5\n```\n\n### Using another command\n\nIf 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.\n\n```bash\nphp artisan schedule:run-cronless --command=your-favorite-artisan-command\n```\n\n### Only run the schedule for a certain period\n\nBy default, the command will run forever. You can shorten that period by passing an amount of seconds to the `stop-after-seconds` option.\n\nIn this example we'll stop the command after 5 seconds\n\n```bash\nphp artisan schedule:run-cronless --stop-after-seconds=5\n```\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security\n\nIf you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.\n\n## Credits\n\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-cronless-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Flaravel-cronless-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-cronless-schedule/lists"}