Azure LogicApps可以停止Web作业吗? [英] Can a Azure LogicApps stop a webjob?

查看:70
本文介绍了Azure LogicApps可以停止Web作业吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure LogicApps时间!在我之前的帖子中,我的问题是了解如何运行webjob.我的问题是:如何停止webjob?

Azure LogicApps time! In my previous post my problem was to understand how to run a webjob. My problem is: how can I stop a webjob?

在Stackoverflow的另一篇文章中,人们发送了一个DELETE请求来停止网络作业,例如

In another posts in Stackoverflow, people send a DELETE request to stop a webjob like

$username = $website.PublishingUsername
$password = $website.PublishingPassword
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$ps = Invoke-RestMethod -Uri "$apiBaseUrl/processes" -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method GET    
$id = $($ps | where {$_.name -eq $jobname} ).id
Invoke-RestMethod -Uri "$apiBaseUrl/processes/$id" -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method DELETE    
write-host "killed process $id" 

我只发送了DELETE请求,但Webjob消失了.基本上,它已被删除.

I sent just a DELETE request and the webjob disappeared. Basically, it was deleted.

推荐答案

您仍然可以使用 HTTP 触发器或操作来请求 Post 操作.但是您需要注意一件事, Webjob API 仅支持停止 continuous Webjob.因此,如果您连续不断,就可以实现自己的目标.

You still could use HTTP trigger or action to request a Post action. But You need to pay attention to one thing, the Webjob API only support to stop continuous Webjob. So if yours is continuous, you could achieve your purpose.

这是我的测试照片.

And this is my test pic.

并且WebJob API仍支持其他请求操作,有关详细信息,您可以参考此 维基 .

And the WebJob API still support other request action, about details you could refer to this wiki.

希望这可以为您提供帮助,如果您还有其他问题,请告诉我.

Hope this could help you, if you still have other questions, please let me know.

这篇关于Azure LogicApps可以停止Web作业吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆