mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Added /V1 /Z to remove scheduled task after run
This commit is contained in:
parent
a055cca79f
commit
52824f9602
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ def create_win_salt_restart_task():
|
|||
|
||||
salt '*' service.create_win_salt_restart_task()
|
||||
'''
|
||||
cmd = 'schtasks /RU "System" /Create /TN restart-salt-minion /TR "powershell Restart-Service salt-minion" /sc ONCE /sd 01/01/1975 /st 01:00 /F'
|
||||
cmd = 'schtasks /RU "System" /Create /TN restart-salt-minion /TR "powershell Restart-Service salt-minion" /sc ONCE /sd 01/01/1975 /st 01:00 /F /V1 /Z'
|
||||
|
||||
return __salt__['cmd.shell'](cmd)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue