-
Notifications
You must be signed in to change notification settings - Fork 24
Install
Allow Flex to use contrib recipes and require the bundle :
$ composer config extra.symfony.allow-contrib true
$ composer require dukecity/command-scheduler-bundleThe recipe will enable the bundle and its routes, so you can go directly to the configuration section
Add the bundle and dependencies in your composer.json :
$ composer require dukecity/command-scheduler-bundleIf you don't have composer yet, please refer to the official Composer website.
Note : use the last release, dev-master is not stable
Enable the bundle in the kernel (schuld be handled for you by symfony):
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Dukecity\CommandSchedulerBundle\DukecityCommandSchedulerBundle(),
);
}Now, you have to register the routes provided by the bundle :
# app/config/routing.yml
dukecity_command_scheduler:
resource: "@DukecityCommandSchedulerBundle/Resources/config/routing.php"
prefix: /If you do not have auto_mapping set to true or you are using multiple entity managers, then set the bundle in the proper entity manager:
# app/config/config.yml
doctrine:
orm:
entity_managers:
default:
mappings:
YourBundle: ~
DukecityCommandSchedulerBundle: ~If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config.
# app/config/config.yml
framework:
translator: ~For more information about translations, check Symfony documentation.
Install bundle's assets :
$ php bin/console assets:install --symlink --relative public$ php bin/console make:migration
$ php bin/console doctrine:migrations:migrateIn case you're using another doctrine manager
$ php bin/console doctrine:schema:update --em=[manager_name] --forceNow, you can use the bundle and manage your scheduling here : http://{your-app-root}/command-scheduler/list and execute them with this new command
$ php bin/console scheduler:executeSee the Usage section to have more information