Apache Ant Sleep Task

This task is used to sleep process for a specified time. Time can be in milliseconds, seconds or hours. It is useful while deploying application requires interval between tasks.

It uses various attributes which are given below.

Apache Ant Sleep Task Attributes

AttributeDescriptionRequired
hoursSet number of hours to sleep.No
minutesSet number of minutes to sleep.No
secondsSet number of seconds to sleep.No
millisecondsSet sleep time in milliseconds.No
failonerrorFlag controlling whether to break the build on an errorNo

Apache Ant Sleep Task Example

Sleep for specified milliseconds.

Sleep for specified seconds

Sleep for no time





Latest Courses