Scheduled Azure WebJob deployed via Git results in On Demand Job

為{幸葍}努か 提交于 2019-12-03 10:40:51

There is finally a solution for deploying scheduled webjobs with git deployment.

This blog has details.

The solution uses the kudu scheduler as opposed to the Azure scheduler so the Azure portal still shows the job as "On Demand" but it does execute per schedule and the portal shows history accurately.

Indeed, the problem is that the scenario is not yet well supported. Specifically, when publishing via git (or GitHub/Bitbucket), the webjob-publish-settings.json file is ignored.

One workaround is to publish once using VS just to get the scheduler created, and then use git afterwards.

Eventually, this scenario will be solved by using Azure Resource Manager templates that define both the WebSite and the scheduler. Technically, this can be done today, but there is not much documentation out there yet.

dprothero

Until there's a better supported mechanism for this from Azure, you could look into scripting this out using PowerShell. See: Create a Scheduled Azure WebJob with PowerShell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!