Final doc fixes

This commit is contained in:
twangboy 2019-04-15 16:31:20 -06:00
parent 58f0cd2b86
commit a279d45843
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -365,10 +365,10 @@ def list_folders(location='\\'):
Args:
location (str):
A string value representing the folder from which you want to list
tasks. Default is ``\`` which is the root for the task scheduler
(``C:\Windows\System32\tasks``).
location (str):
A string value representing the folder from which you want to list
tasks. Default is ``\`` which is the root for the task scheduler
(``C:\Windows\System32\tasks``).
Returns:
list: Returns a list of folders.
@ -408,9 +408,10 @@ def list_triggers(name, location='\\'):
name (str):
The name of the task for which list triggers.
location (str): A string value representing the location of the task
from which to list triggers. Default is ``\`` which is the root for
the task scheduler (``C:\Windows\System32\tasks``).
location (str):
A string value representing the location of the task from which to
list triggers. Default is ``\`` which is the root for the task
scheduler (``C:\Windows\System32\tasks``).
Returns:
list: Returns a list of triggers.
@ -675,7 +676,7 @@ def create_task_from_xml(name,
except KeyError:
failure_code = 'Unknown Failure: {0}'.format(error)
log.debug('Failed to create task: {0}'.format(failure_code))
log.debug('Failed to create task: %s', failure_code)
# Verify creation
if name in list_tasks(location):
@ -1772,6 +1773,15 @@ def add_trigger(name=None,
r'''
Add a trigger to a Windows Scheduled task
.. 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
Args:
name (str):
@ -2058,15 +2068,6 @@ 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
Returns:
bool: ``True`` if successful, otherwise ``False``
@ -2074,7 +2075,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'