Ryan Gates
Ryan Gates

Reputation: 4539

Error Creating Webjob schedule

I have the source code hosted in a TFS 2012 on premise installation. When I try to publish my Azure WebJob to Azure from Visual Studio 2015, I get the following error.

Error : An error occurred while creating the WebJob schedule: Response status code does not indicate success: 409 (Conflict).

The WebJob does get created under the web application, but it is set to On Demand rather than scheduled.

When I open Fiddler to try to troubleshoot this issue, I get the following error.

Error ERROR_CONNECTION_TERMINATED: Web deployment task failed. (Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.)

How can I publish my scheduled WebJob to Azure? Or at least get more specific errors?

Upvotes: 7

Views: 4820

Answers (3)

Arek
Arek

Reputation: 171

I had the same problem and it turned out that publish process failed because I set it to recur every 10 minutes while the app was meant to run in free tier. As MS describes here:

https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/

one can deploy with all frequencies other than those defined in minutes.

Upvotes: 16

Chris Anderson
Chris Anderson

Reputation: 8505

If VS tooling isn't working and you don't want to manually set up the Scheduler, you can try using the built in Scheduler that Kudu (the Web Apps Management framework) provides - https://github.com/projectkudu/kudu/wiki/Web-jobs#scheduling-a-triggered-webjob

To schedule a triggered WebJob you need to add a schedule property to the settings.job file. The value of the schedule is cron expression that has 6 fields to represent the schedule: {second} {minute} {hour} {day} {month} {day of the week}.

You need to be using a Standard WebApp with "Always On" turned on for this to work.

So you just add the following to a settings file if you want to run every 5 minutes.

{
  "schedule": "* */1 * * * *"
}

Sorry for the tooling issues, it's something I'm trying to help resolve.

Upvotes: 5

Jonathan
Jonathan

Reputation: 1755

I have had issues several times with the Web Job deployment and had to manually deploy it through the azure portal. It is kind of annoying but much more reliable.

Upvotes: 1

Related Questions