jenkins开始异步“从构建产生进程”

时间:2015-02-12 19:47:39

标签: process jenkins

不确定从https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build复制此代码的位置 试图把它放在我的作业

的config.xml中
<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description>dont use now</description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.BatchFile>
      <command>\work\s1.bat</command>
    </hudson.tasks.BatchFile>

    <scriptdef name="get-next-minute" language="beanshell">
  <attribute name="property" />

  date = new java.text.SimpleDateFormat("HH:mm")
    .format(new Date(System.currentTimeMillis() + 60000));
  project.setProperty(attributes.get("property"), date);
</scriptdef>

<get-next-minute property="next-minute" />
<exec executable="at">
  <arg value="${next-minute}" />
  <arg value="/interactive" />
  <arg value="\work\start.bat" />
</exec>
  </builders>
  <publishers/>
  <buildWrappers/>
</project>

但是现在这个工作没有出现在用户界面中(上面在记事本++上编辑)

1 个答案:

答案 0 :(得分:1)

两个选项:

  • 重新启动Jenkins

  • 进入“管理Jenkins”&gt; “从磁盘重新加载配置”

希望有所帮助