如何使用 vNext 在 VSO 中通过 CI 部署 webjob [英] How to deploy a webjob through CI in VSO with vNext

查看:19
本文介绍了如何使用 vNext 在 VSO 中通过 CI 部署 webjob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 VSO 中的 CI 和 vNext 任务部署预定的 webjob.

I'm trying to deploy a scheduled webjob through CI and vNext tasks in VSO.

我按照以下教程中的步骤部署了一个 webjob 和一个 Web 应用程序(启用 Web 项目的自动部署"):https://azure.microsoft.com/en-我们/文档/文章/websites-dotnet-deploy-webjobs/

I followed the steps in the following tutorial to deploy a webjob along with a web app ("Enable automatic deployment with a web project"): https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/

我部分成功了:webjob 与 Web 应用程序一起部署.但是,它被标记为On Demand 而不是Scheduled(或任何适当的状态).我可以手动运行 webjob,它运行得很好.我检查了文件 webjob-publish-settings.json(在 webjob 中)和 webjobs-list.json(在 web 应用程序中),它们似乎没问题,判断来自教程.

I succeeded partially: the webjob gets deployed along with the web application. However, it is marked as On Demand instead of Scheduled (or whatever the proper status is). I can run the webjob manually and it runs just fine. I checked the files webjob-publish-settings.json (in the webjob) and webjobs-list.json (in the web app) and they seem to be alright, judging from the tutorial.

我错过了什么吗?谢谢.

Am I missing anything? Thank you.

推荐答案

如果您的应用在 Basic 或 High 模式下运行,您可以使用 cron 表达式来创建 webjob 调度程序.有关详细信息,请参阅此链接:创建使用 CRON 表达式的预定 WebJob

You can use the cron expression to create the webjob scheduler if your app is running in Basic or High mode. Refer to this link for details: Create a scheduled WebJob using a CRON expression

否则,您需要 启用 Azure Webjobs 的持续交付.

更多参考:部署你的WebJobs 使用持续交付在您的 Azure 网站上进行项目

这篇关于如何使用 vNext 在 VSO 中通过 CI 部署 webjob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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