场景:linux服务器上运行jenkins server,window桌面前 台运行jenkins-slave,想将jenkins-slave.bat放到window后台运行
实现:
新建jenkins.bat文件,内容如下:
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
::
cd "C:\Users\Administrator\Desktop"
jenkins-10.28.18.3.bat
桌面双击jenkins.bat 运行 jenkins-slave即在window后台运行。
标签:bat,slave,window,后台,jenkins,运行 From: https://www.cnblogs.com/zyl88/p/16601217.html