Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Jenkins 中运行一个脚本 10 个小时。那可能吗 ?我的脚本长度约为 55 分钟。我现在已经安排它每小时运行一次。所以它每小时都运行一次。(而且永远不会停止!!)
但是有没有办法让运行指定的时间,比如 10 个小时,然后自动停止?我希望它指定这个 55 分钟脚本应该连续运行多长时间,然后自动停止,而不是调度。
因此,如果我在上午 8 点开始构建并说运行 3 小时,它应该一直运行到上午 11 点然后停止。
您应该能够通过cron触发构建来实现这一点。
例如,作业H 8-10/1 * * *应该在 8 点到 10:59 之间每小时运行一次。
H 8-10/1 * * *
查看 SCM 触发器旁边的 Jenkins 帮助。