Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@saltmaster states]# salt 'GSWDS' task.create_task TESTTASK user_name=System force=True action_type=Execute cmd='c:\windows\notepad.exe' trigger_type=Once start_date=2017-03-07 start_time=13:00
- GSWDS:
- Passed invalid arguments to task.create_task: strptime() argument 1 must be string, not int
- Create a new task in the designated location. This function has many keyword
- arguments that are not listed here. For additional arguments see:
- - py:function::`edit_task`
- - py:function::`add_action`
- - py:function::`add_trigger`
- :param str name: The name of the task. This will be displayed in the task
- scheduler.
- :param str location: A string value representing the location in which to
- create the task. Default is '\\' which is the root for the task scheduler
- (C:\Windows\System32\tasks).
- :param str user_name: The user account under which to run the task. To
- specify the 'System' account, use 'System'. The password will be ignored.
- :param str password: The password to use for authentication. This should set
- the task to run whether the user is logged in or not, but is currently not
- working.
- :param bool force: If the task exists, overwrite the existing task.
- :return: True if successful, False if unsuccessful
- :rtype: bool
- CLI Example:
- .. code-block:: bash
- salt 'minion-id' task.create_task <task_name> user_name=System force=True action_type=Execute cmd='del /Q /S C:\\Temp' trigger_type=Once start_date=2016-12-1 start_time=01:00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement