Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. [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
  2.  
  3. GSWDS:
  4. Passed invalid arguments to task.create_task: strptime() argument 1 must be string, not int
  5.  
  6. Create a new task in the designated location. This function has many keyword
  7. arguments that are not listed here. For additional arguments see:
  8.  
  9. - py:function::`edit_task`
  10. - py:function::`add_action`
  11. - py:function::`add_trigger`
  12.  
  13. :param str name: The name of the task. This will be displayed in the task
  14. scheduler.
  15.  
  16. :param str location: A string value representing the location in which to
  17. create the task. Default is '\\' which is the root for the task scheduler
  18. (C:\Windows\System32\tasks).
  19.  
  20. :param str user_name: The user account under which to run the task. To
  21. specify the 'System' account, use 'System'. The password will be ignored.
  22.  
  23. :param str password: The password to use for authentication. This should set
  24. the task to run whether the user is logged in or not, but is currently not
  25. working.
  26.  
  27. :param bool force: If the task exists, overwrite the existing task.
  28.  
  29. :return: True if successful, False if unsuccessful
  30. :rtype: bool
  31.  
  32. CLI Example:
  33.  
  34. .. code-block:: bash
  35.  
  36. 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