Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require sulu/automation-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Enable the bundle by adding it to the list of registered bundles in the
config/bundles.php
file of your Sulu project.
Task\TaskBundle\TaskBundle::class => ['all' => true],
Sulu\Bundle\AutomationBundle\SuluAutomationBundle::class => ['all' => true],
Add the required routes to the config/routes/sulu_admin.yaml
configuration file.
sulu_automation_api:
resource: '@SuluAutomationBundle/Resources/config/routing_api.yml'
prefix: /admin/api
sulu_automation:
type: rest
resource: '@SuluAutomationBundle/Resources/config/routing.yml'
prefix: /admin/automation
The bundle needs a few database tables, therefore you should update your schema using doctrine migrations or the following command:
bin/console doctrine:schema:update --force
The php-task library requires a cronjob to run the scheduled tasks. The cronjob
should run the task:run
command.
bin/adminconsole task:run
Admins won't automatically start seeing automation tab. You need to modify your user roles and grant permissions to automations in order for that to work.