Scheduler Command Plugin.
Schedule Symfony Commands in your Sylius admin panel.
- See the list of planned command
- Add, edit, enable/disable or delete scheduled commands
- For each command, you have to define :
- Selected Command from the list of Symfony commands
- Based on Cron schedule expression see Cron formats
- Output Log file (optional)
- Priority (highest is priority)
- Run the Command immediately
- Download, show file size, empty log files directly from the admin panel
- Define commands with a Factory (from a Doctrine migration, for example)
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:
Launch Run command in your Crontab
* * * * * /_PROJECT_DIRECTORY_/bin/console synolia:scheduler-run
(optional) Showing humanized cron expression
composer require sivaschenko/utility-cron
- Log into admin panel
- Click on
Scheduled commandsin the Configuration section in main menu
- Manage your Scheduled commands
Inside sylius fixture file
config/packages/sylius_fixtures.yaml you can add scheduled command fixtures to your suite.
sylius_fixtures: suites: my_fixture_suite: fixtures: scheduler_command: options: scheduled_commands: - name: 'Reset Sylius' command: 'sylius:fixtures:load' cronExpression: '0 0 * * *' logFile: 'reset.log' priority: 0 enabled: true - name: 'Cancel Unpaid Orders' command: 'sylius:cancel-unpaid-orders' cronExpression: '0 0 * * *' priority: 1 enabled: false
See How to contribute.
This library is under the MIT license.
Developed by Synolia.