4
votes

I am able to successfully deploy my WebJobs to my Azure website, however, my WebJob is being set to 'On Demand' instead of 'Scheduled' even though I configured the job to run 1x daily at 4am. I see the following warning in my deployment log:

D:\home\site\repository\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.wap.targets(151,5): warning : WebJob schedule for MyWebJob will not be created. WebJob schedules can only be created when the publish destination is an Azure Website [D:\home\site\repository\MyProject\MyProject.csproj]

I'm not really sure what this means because my WebJob is definitely being deployed to my Azure website and I can see it in my list of WebJobs for my site.

Any ideas on what I am doing wrong?

2

2 Answers

3
votes

I was able to resolve this issue by deploying directly from Visual Studio instead of auto-deploying via git. It seems that creating a scheduled job via git deployment is currently unsupported.

2
votes

First, to get past the msbuild warning, add /p:_DestinationType=AzureWebSite to your msbuild call. That will get you to the place where it is trying to publish the webjobs defined in your webjobs-list.json

The process to deploy from a CI server is discussed here in detail http://azure.microsoft.com/blog/2014/08/18/enabling-command-line-or-continuous-delivery-of-azure-webjobs/

Essentially, you'll need to add a new file to Properties called webjobs.props which will contain the authentication information and get you past the interactive prompts.