Merge pull request #49022 from dwoz/47481_docs

Document time format idiosyncrasies
This commit is contained in:
Nicole Thomas 2018-08-09 13:47:11 -04:00 committed by GitHub
commit bb9d23bfa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1845,6 +1845,15 @@ def add_trigger(name=None,
- SessionLock: When the workstation is locked
- SessionUnlock: When the workstation is unlocked
.. note::
Arguments are parsed by the YAML loader and are subject to yaml's
idiosyncrasies. Therefore, time values in some formats (``%H:%M:%S`` and
``%H:%M``) should to be quoted. See `YAML IDIOSYNCRASIES`_ for more details.
.. _`YAML IDIOSYNCRASIES`: https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#time-expressions
:return: True if successful, False if unsuccessful
:rtype: bool
@ -1852,7 +1861,7 @@ def add_trigger(name=None,
.. code-block:: bash
salt 'minion-id' task.add_trigger <task_name> trigger_type=Once trigger_enabled=True start_date=2016/12/1 start_time=12:01
salt 'minion-id' task.add_trigger <task_name> trigger_type=Once trigger_enabled=True start_date=2016/12/1 start_time='"12:01"'
'''
if not trigger_type:
return 'Required parameter "trigger_type" not specified'