elektro-potkan / scheduler-console
Console support for scheduler
Requires
- php: >= 7.2
- elektro-potkan/scheduler: ^1.0.0
- symfony/console: ^5.0.0
Requires (Dev)
- phpstan/phpstan: ^0.12
- phpstan/phpstan-deprecation-rules: ^0.12
- phpstan/phpstan-nette: ^0.12
- phpstan/phpstan-strict-rules: ^0.12
Suggests
- contributte/console: to automatically bundle all commands registered in Nette DI into an application
- elektro-potkan/scheduler-di: to integrate scheduler with Nette DI
This package is auto-updated.
Last update: 2025-03-07 13:06:47 UTC
README
Part of heavily modified fork of contributte/scheduler.
Adds support to run the scheduler from console (e.g. via system cron daemon).
Usage
Setup
This package relies on symfony/console
.
The simplest way is to use the elektro-potkan/scheduler-di
package
to register the console commands into Nette DI
and then the contributte/console
integration to automatically
bundle the DI-registered commands into a console application.
composer require contributte/console
composer require elektro-potkan/scheduler-di
Register the extension into Nette DI via NEON config file:
extensions:
console: Contributte\Console\DI\ConsoleExtension(%consoleMode%)
System cron daemon
Set-up crontab to run the scheduler each minute.
Use the scheduler:run
command.
* * * * * php path-to-project/console scheduler:run
Commands
After completing the setup, You can fire one of these commands.
Command | Info |
---|---|
scheduler:help | Print cron syntax. |
scheduler:list | List all jobs. |
scheduler:run | Run all due jobs. |
scheduler:force-run | Force run selected scheduler job. |
Authors
- Modified fork by Elektro-potkan git@elektro-potkan.cz.
- Original Contributte package authors (see Composer config file):
Info
Versioning
This project uses Semantic Versioning 2.0.0 (semver.org).
Branching
This project uses slightly modified Git-Flow Workflow and Branching Model:
- https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
- https://nvie.com/posts/a-successful-git-branching-model/
License
You may use this program under the terms of the MIT License.
See file LICENSE.