2024-05-15 05:52:30 发布
网友
我对使用Rundeck很陌生。我的工作应该是执行一个python文件。我的设备有Python3.8.5和3.7两种版本。Rundeck使用3.7版,即使在我的环境变量中,我将PY_HOME设置为3.8.5版。我如何告诉我的rundeck使用3.8.5版?谢谢你的帮助
您可以在scrip步骤中为脚本(python2、python3等)定义任何解释器,只需执行您的工作,在“脚本”步骤(内联脚本)或“脚本文件或URL”步骤中单击“高级”按钮,并在“调用字符串”文本框中添加Python 3.8.5的路径,在“扩展”文本框中添加“.py”,查看this
我留下了一个工作定义示例:
<joblist> <job> <defaultTab>nodes</defaultTab> <description></description> <executionEnabled>true</executionEnabled> <id>031b03b4-220f-4ad0-9c47-3ca47506ba82</id> <loglevel>INFO</loglevel> <name>HelloWorldPy</name> <nodeFilterEditable>false</nodeFilterEditable> <plugins /> <scheduleEnabled>true</scheduleEnabled> <sequence keepgoing='false' strategy='node-first'> <command> <fileExtension>.py</fileExtension> <script><![CDATA[print("hello world!")]]></script> <scriptargs /> <scriptinterpreter>C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe</scriptinterpreter> </command> </sequence> <uuid>031b03b4-220f-4ad0-9c47-3ca47506ba82</uuid> </job> </joblist>
您可以在scrip步骤中为脚本(python2、python3等)定义任何解释器,只需执行您的工作,在“脚本”步骤(内联脚本)或“脚本文件或URL”步骤中单击“高级”按钮,并在“调用字符串”文本框中添加Python 3.8.5的路径,在“扩展”文本框中添加“.py”,查看this
我留下了一个工作定义示例:
相关问题 更多 >
编程相关推荐