Create and deploy Webjob from another Webjob

2019-09-14 05:04发布

Is it possible to deploy a Webjob from another Webjob in Azure? I've read the documentation, it's all about manually instantiating a Webjob, or using CronJobs. I want, in a Webjob, deploy and run another Webjob with some parameters.

标签: azure webjob
1条回答
成全新的幸福
2楼-- · 2019-09-14 05:29

Is it possible to deploy a Webjob from another Webjob in Azure? 

Yes, we could deploy a WebJob automatically also including WebJob way. We could deploy a WebJob using Kudu WebJob API. I test it with fiddler,it works correctly. The following is my details steps.

https://{userName}:{password}@{WebAppName}.scm.azurewebsites.net/api/zip/site/wwwroot/App_Data/jobs/{continuous or triggered}/{job name}/

1.Get the username, password info from the azure website profile

enter image description here

2.Send the http put request with header and attach the zip file in the request body

Content-Type: application/zip

Content-Disposition: attachement; filename=myfilename

enter image description here

3.Check from the azure portal that WebJob has been created correctly.

enter image description here

查看更多
登录 后发表回答