@@ -11,6 +11,7 @@ Additional features which are implemented in this bundle.
1111* Different commands to manage and debug commands
1212* Persist tasks and executions in database
1313* Run statistics foreach execution of tasks
14+ * Predefined system-tasks
1415
1516Installation
1617------------
@@ -51,15 +52,50 @@ tasks.
5152 This option only works if you enable the storage in doctrine which will
5253 persist your tasks in a table-structure.
5354
55+ System-Tasks
56+ ------------
57+
58+ System-tasks can be used to predefine tasks for deployment. The developer
59+ can define which handler will be called (with an ``cron_expression `` and
60+ a ``workload ``). This tasks can be scheduled with the following command.
61+
62+ .. code-block :: yaml
63+
64+ task :
65+ system_tasks :
66+ my-task :
67+ enabled : true
68+ handler_class : ' AppBundle\Handler\TestHandler'
69+ cron_expression : ' @daily'
70+
71+ .. code-block :: bash
72+
73+ bin/console task:schedule:system-tasks
74+
75+ Already scheduled system-tasks can be disabled in the configuration. But
76+ bigger changes like changing the ``handler_class `` are currently not
77+ supported.
78+
79+ After addition or changing in the config you have to run the command again
80+ to be sure that the task-table will be updated.
81+
5482Configuration Reference
5583-----------------------
5684
5785.. code-block :: yaml
5886
59- task :
60- storage : array # One of "array" or "doctrine"
61- run :
62- mode : ' off' # One of "off" or "listener"
87+ task :
88+ storage : doctrine # One of "array"; "doctrine"
89+ adapters :
90+ doctrine :
91+ clear : true
92+ run :
93+ mode : ' off' # One of "off"; "listener"
94+ system_tasks :
95+ enabled : true
96+ handler_class : ~
97+ workload : null
98+ cron_expression : ~
6399
64100 .. _fastcgi_finish_request : http://php.net/manual/en/function.fastcgi-finish-request.php
65101.. _PHP FPM : http://php.net/manual/en/install.fpm.php
0 commit comments