elektro-potkan/scheduler-console

Console support for scheduler

v1.0.0 2021-10-07 06:52 UTC

This package is auto-updated.

Last update: 2024-04-07 10:53:05 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.

CommandInfo
scheduler:helpPrint cron syntax.
scheduler:listList all jobs.
scheduler:runRun all due jobs.
scheduler:force-runForce run selected scheduler job.

Authors

Info

Versioning

This project uses Semantic Versioning 2.0.0 (semver.org).

Branching

This project uses slightly modified Git-Flow Workflow and Branching Model:

License

You may use this program under the terms of the MIT License.

See file LICENSE.