有没有一种方法可以“延迟"响应.通过REST API进行的工作

编程入门 行业动态 更新时间:2024-10-26 14:36:45
本文介绍了有没有一种方法可以“延迟"响应.通过REST API进行的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

即时消息插件可以接收IM消息,例如在10秒钟内构建XYZ",并将作业设置为在10秒内运行.它通过Java API来计划作业[0].

The instant messaging plugin is capable of taking an IM message like, "build XYZ in 10s" and setting the job to run in 10 seconds. It does this via a java API to schedule the job[0].

我想知道是否可以通过REST API [1]传递一些魔术参数,使我能够以相同的方式延迟"工作?

I'd like to know if there is some magic parameter I can pass on the REST API[1] that will allow me to "delay" a job in the same manner?

谢谢.

[0]- github/jenkinsci/instant-messaging-plugin/blob/master/src/main/java/hudson/plugins/im/bot/BuildCommand.java#L54

[1]- wiki.jenkins-ci. org/display/JENKINS/Remote + access + API

推荐答案

获取以下URL:

jenkins/job/jobname/build?delay=4000sec

此示例将导致作业在4000秒后开始.

This example will result in a job being started after 4000 seconds.

这对于参数化作业也适用于buildWithParameters URL.

This works with the buildWithParameters URL for parameterized jobs as well.

更多推荐

有没有一种方法可以“延迟"响应.通过REST API进行的工作

本文发布于:2023-11-23 18:22:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622435.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   工作   REST   quot   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!