Download the PHP package synolia/sylius-scheduler-command-plugin without Composer
On this page you can find all versions of the php package synolia/sylius-scheduler-command-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download synolia/sylius-scheduler-command-plugin
More information about synolia/sylius-scheduler-command-plugin
Files in synolia/sylius-scheduler-command-plugin
Package sylius-scheduler-command-plugin
Short Description Scheduler Command Plugin.
License MIT
Informations about the package sylius-scheduler-command-plugin
Scheduler Command Plugin
Schedule Symfony Commands in your Sylius admin panel.
Commands list
Scheduled Commands list
Features
- See the list of planned command
- Add, edit, enable/disable or delete scheduled commands
- For each command, you have to define :
- Name
- Selected Command from the list of Symfony commands
- Based on Cron schedule expression see Cron formats
- Output Log file prefix (optional)
- Priority (highest is priority)
- Run the Command immediately (at the next passage of the command
synolia:scheduler-run
) - Run a Command juste one time (from history page clic on
Launch a command
button) - Download or live view of log files directly from the admin panel
- Define commands with a Factory (from a Doctrine migration, for example)
Requirements
Version | |
---|---|
PHP | ^8.0 |
Sylius | ^1.10 |
Installation
-
Add the bundle and dependencies in your composer.json :
composer config extra.symfony.allow-contrib true composer req synolia/sylius-scheduler-command-plugin
-
Apply migrations to your database:
bin/console doctrine:migrations:migrate
-
Launch Run command in your Crontab
* * * * * /_PROJECT_DIRECTORY_/bin/console synolia:scheduler-run
-
(optional) Showing humanized cron expression
composer require lorisleiva/cron-translator
-
Till
symfony/recipes-contrib
is updated for the v3, you must addsylius_scheduler_command.yaml
frominstall/Application/config/{packages,routes}
to your project by respecting the same folder architecture.cp -R vendor/synolia/sylius-scheduler-command-plugin/install/Application/config/packages/* config/packages/ cp -R vendor/synolia/sylius-scheduler-command-plugin/install/Application/config/routes/* config/routes/
Usage
- Log into admin panel
- Click on
Scheduled commands
in the Scheduled commands section in main menu to manage your Scheduled commands - Click on
Scheduled commands history
in the Scheduled commands section in main menu to see history of commands
Fixtures
Inside sylius fixture file config/packages/sylius_fixtures.yaml
you can add scheduled command fixtures to your suite.
Commands
synolia:scheduler-run
Execute scheduled commands.
- options:
- --id (run only a specific scheduled command)
Run all scheduled commands : php bin/console synolia:scheduler-run
Run one scheduled command : php bin/console synolia:scheduler-run --id=5
synolia:scheduler:purge-history
Purge scheduled command history greater than {X} days old.
- options:
- --all (purge everything)
- --days (number of days to keep)
- --state (array of schedule states)
- --dry-run
Example to remove all finished and in error scheduled commands after 7 days :
php bin/console synolia:scheduler:purge-history --state=finished --state=error --days=7
Optional services
Development
See How to contribute.
License
This library is under the MIT license.
Credits
Developed by Synolia.
All versions of sylius-scheduler-command-plugin with dependencies
ext-json Version *
ext-intl Version *
dragonmantank/cron-expression Version ^3.0
sylius/sylius Version ^1.10
symfony/framework-bundle Version ^5.4|^6.0
symfony/lock Version ^5.4|^6.0
symfony/polyfill-intl-icu Version ^1.26
symfony/process Version ^5.4|^6.0
symfony/service-contracts Version ^1.1|^2.0|^3.0
webmozart/assert Version ^1.10