Ant If与Corn

Perform some tasks based on whether a given condition holds true or not.
根据给定的条件是否正确执行一些任务。

有三个子元素:
<elseif>, <then> and <else>
例子
<var name="foo" value="bar"/>
<if>
<equals arg1="${foo}" arg2="bar" />
<then>
<echo message="The value of property foo is bar" />
</then>
<else>
<echo message="The value of property foo is not bar" />
</else>
</if>
Ant If与Corn

<var name="foo" value="foo"/>
<if>
<equals arg1="${foo}" arg2="bar" />
<then>
<echo message="The value of property foo is 'bar'" />
</then>

<elseif>
<equals arg1="${foo}" arg2="foo" />
<then>
<echo message="The value of property foo is 'foo'" />
</then>
</elseif>
<else>
<echo message="The value of property foo is not 'foo' or 'bar'" />
</else>
</if>
判断而已,没什么好说。
Ant If与Corn


Corn实现表达式的判断
实现Corn的取下一次时间
必需要带四个参数:
exp:Corn表达式
time 判断时间
format 判断时间的格式(yyyyMMdd HH:mm:ss)
property 存储“判断时间后下次符合条件的时间

示例:
Ant If与Corn
Ant If与Corn
备注:中文格式有问题