【发布时间】:2015-04-13 17:17:00
【问题描述】:
不确定这段代码从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>
但现在 UI 中没有显示该作业(上面在记事本++上编辑)
【问题讨论】: