Skip to content

Commit 6e17065

Browse files
wachterjohannesalexander-schranz
authored andcommitted
Added system-task doc (#4)
* added system-task doc * fixed comments
1 parent c826eab commit 6e17065

File tree

4 files changed

+53
-8
lines changed

4 files changed

+53
-8
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,8 @@ pseudoxml:
190190
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
191191
@echo
192192
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
193+
194+
ditaa:
195+
ditaa img/state-machine.ditaa -o -S -E
196+
@echo
197+
@echo "Build finished. The image files files are in img"

img/state-machine.ditaa

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
|
99
| +-------------+
1010
+--> | failed |
11-
+-------------+
12-
| - exception |
13-
| - endTime |
14-
| - duration |
11+
| +-------------+
12+
| | - exception |
13+
| | - endTime |
14+
| | - duration |
15+
| +-------------+
16+
|
17+
| +-------------+
18+
+--> | aborted |
1519
+-------------+

img/state-machine.png

1.4 KB
Loading

symfony.rst

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1516
Installation
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+
5482
Configuration 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

Comments
 (0)