Visual Studio 2015 Publish WebJobs Issue

后端 未结 4 1711
独厮守ぢ
独厮守ぢ 2021-01-04 19:36

Using the right-click, Publish as Azure WebJob... option in VisualStudio 2015, the job is published however the runMode seems to be ignored.

In my file, I have the f

4条回答
  •  迷失自我
    2021-01-04 20:00

    There is now a better way of scheduling WebJobs using CRON expressions, which is simpler and avoids all the Scheduler issues mentioned here.

    To use it, do the following:

    • Your Azure Web App must be running in Standard mode, and have 'Always On' enabled.
    • When creating your WebJob in Visual Studio, choose 'Run on Demand' instead of 'Run on a Schedule'.
    • Create a settings.job file at the root of your WebJob. Make sure to set Copy to Output Directory='Copy if newer'. This file should contain something like this (which makes it run on the top of each hour):

    { "schedule": "0 0 * * * *" }

    For more information, about this technique, see the following links:

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/#CreateScheduledCRON

    http://blog.amitapple.com/post/2015/06/scheduling-azure-webjobs/

提交回复
热议问题