我可以限制构建每天的执行次数吗?

Can i limit number of execution per day for a build?

在 Jenkins 中,我需要限制 运行ning 作业每天只执行一次 这是可能的 ?

我的构建只是一个批处理命令

我有一个 cron 用于按固定时间执行我的工作,我也可以使用 URL 手动执行 运行 我的工作。如果作业已经执行,则当天必须阻塞

谢谢大家的回答

因此假设您的作业名为 TestJob ,创建另一个名为 DisableEnable_TestJob 的作业。 在 DisableEnable_TestJob 中将其配置为使用 Build trigger 触发 然后你可以使用 Job DSL plugin to disactivate a specific TestJob and then activate after the system time is midnight. Refer to this answer to see how to use it: Activate and disactivate a job using DSL plugin 。您只需搜索如何等到午夜时间,但这应该不是问题。一旦时间到了 12:00,您就可以再次激活该作业。

如果您需要更多帮助,请联系我