Skip to content

Commit

Permalink
Document how to set a module timer
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobGM committed Feb 11, 2018
1 parent 6737efc commit 4d71c4a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ These modules are used to define:
:ref:`actions`
Tasks to be performed when :ref:`events` occur.

.. _modules_how_to_define:

How to define a module
======================

Expand Down
19 changes: 19 additions & 0 deletions docs/timers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ What are modules used for?
Timers provide you with the tools needed for *dynamic* module behaviour. Sometimes you want a module to :ref:`execute <run_action>` different shell commands, and/or :ref:`compile <compile_action>` templates with :ref:`different context values <context_import_action>`, depending on exactly *when* those :ref:`actions <actions>` are performed.


.. _timer_how_to_define:

How to set a module timer
=========================

Module timers are defined within the :ref:`module block <modules_how_to_define>` it is supposed to provide functionality for. The syntax is as follows:

.. code-block:: yaml
module/some_dynamic_module:
timer:
type: type_of_timer
option1: whatever
option2: something
...
Most timers provide you with additional options in order to tweak their behaviour. These are specified at the same indentation level as the timer type.

.. _timer_periods:

Periods
Expand Down

0 comments on commit 4d71c4a

Please sign in to comment.