有没有办法取消正在运行的作业?
答案可能的。但是,如果您创建Azure IoT Central应用程序,那么当您安排作业时,它们可以选择在某些错误发生时自动取消运行作业。
这是内部的,或者是不可公开的,还是在自定义开发的应用程序中有一些SDK,REST呼叫或任何其他方法可以实现这一目标?
Is there a way to cancel a job that is running?
The answer on this question implies that it is not possible. However if you create Azure IoT Central application, when you schedule a job, they give you the option to automatically cancel a running job when certain % of errors occur.

Is this something internal and not available to public, or are there some SDKs, REST calls or any other ways to achieve this in custom developed applications?
发布评论
评论(1)
更新答案:
Roman Kiss ,您可以参考
“ https://learn.microsoft.com/en-us/rest/rest/api/iotcentral/1.2-previewdataplane/jobs/jobs/stop“ rel =“ nofollow noreferrer” > strong>
api令牌
来自您的IoT Central应用程序可用于授权标题
和您的appid
forappsubdomain
。根据您可以通过REST API取消计划作业,但到目前为止,无法取消运行作业。
您可以参考, and “ nofollow noreferrer”>取消运行状态中的作业
Updated answer:
As commented by Roman Kiss, you can refer to Jobs - Stop
Note: The
API token
from your IoT Central App can be used forAuthorization header
and yourappId
forappsubdomain
.According to documentation, you can cancel scheduled job via REST API but as of now no way to cancel running job.
You can refer to job_client.ts, job_client_requirements.md and Cancel Jobs in running status