-
-
Save anonymous/30ae31ccd423a6a334158ca9604294e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run from CLI | |
PS C:\salt\bin> .\python.exe .\Scripts\salt-call task.create_task TestTask user_name=System force=True cmd='c:\salt\bin\python.exe c:\scripts\my_script.py' trigger_type=Daily | |
local: | |
True | |
PS C:\salt\bin> | |
Run from Python Shell | |
PS C:\salt\bin> .\python.exe | |
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import salt.client | |
>>> caller = salt.client.Caller() | |
>>> caller.cmd('task.create_task','TestTask1',user_name='System',force=True, kwargs={'cmd':'c:\salt\bin\python.exe c:\scripts\my_script.py','trigger_type':'Daily'}) | |
False | |
>>> | |
PS C:\salt\bin> .\python.exe .\Scripts\salt-call --versions | |
Salt Version: | |
Salt: 2017.7.2 | |
Dependency Versions: | |
cffi: 1.10.0 | |
cherrypy: 10.2.1 | |
dateutil: 2.6.0 | |
docker-py: Not Installed | |
gitdb: 2.0.3 | |
gitpython: 2.1.3 | |
ioflo: Not Installed | |
Jinja2: 2.9.6 | |
libgit2: Not Installed | |
libnacl: Not Installed | |
M2Crypto: Not Installed | |
Mako: 1.0.6 | |
msgpack-pure: Not Installed | |
msgpack-python: 0.4.8 | |
mysql-python: Not Installed | |
pycparser: 2.17 | |
pycrypto: 2.6.1 | |
pycryptodome: Not Installed | |
pygit2: Not Installed | |
Python: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] | |
python-gnupg: 0.4.0 | |
PyYAML: 3.11 | |
PyZMQ: 16.0.2 | |
RAET: Not Installed | |
smmap: 2.0.3 | |
timelib: 0.2.4 | |
Tornado: 4.5.1 | |
ZMQ: 4.1.6 | |
System Versions: | |
dist: | |
locale: cp1252 | |
machine: AMD64 | |
release: 2016Server | |
system: Windows | |
version: 2016Server 10.0.14393 Multiprocessor Free |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment