schedule ant task

2019-03-03 12:43发布

Is it possible "and how if you know", to schedule the execution of an ant task? For example, i want my build.xml to be executed every 5 hours or every day at a certain time? I have been looking around but no solution found

Thank you

3条回答
走好不送
2楼-- · 2019-03-03 13:01

For very simple requirements, I'd echo the use of cron.

If the reason for running ANT is to periodically perform a master build of your project's code, then you're effectively following a practice called "Continuous Integration". In that case I'd highly recommend running a continuous integration server, such as Jenkins.

Jenkins is a very useful piece of software, easy to install and can become your automation framework for more than just building your code.

查看更多
乱世女痞
3楼-- · 2019-03-03 13:05

If you are working on a windows environment, you can use the "task scheduler" and set the interval. If you are working in unix/linux, you may use cron for scheduling your job.

查看更多
一纸荒年 Trace。
4楼-- · 2019-03-03 13:06

Just use cron and call ant.sh from it.

查看更多
登录 后发表回答