“An error occurred while creating the WebJob schedule”

Azure WebJob has been very helpful to help me running small automated tasks without the hassle of creating VMs or worker roles. Moreover, if you are using a recent version of Visual Studio (from Update 3, I think), you will also get some tooling support for publishing WebJob to Azure Website directly from inside the IDE. It is much more convenient than the old way: building, zipping, going to the portal, deleting the old build and uploading the new one.

However, I then got a strange problem while publishing the WebJob of one project. The error message simply said: “an error occurred while creating the WebJob schedule,” which is not useful for finding a solution at all. I have tried to search around the Internet for a solution, but cannot find any. Even stranger, I can publish that project normally to my staging websites, but not to the production one.

Eventually I found out that I have not set up any deployment credentials for my production Azure Website, and setting one solve the problem completely. I guess the tooling need that credentials to upload the WebJob’s binaries to the website.

I cost me days and days, and I found the solution accidentally after I had tried to connect to the Website using FTP, which requires deployment credentials. I hope this blog post will save you sometime should you got the same problem. I also hope that the tooling will show better error messages next time.

3 thoughts to ““An error occurred while creating the WebJob schedule””

  1. …\projectfolder\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.console.targets(110,5): Error : An error occurred while creating the WebJob schedule: Object reference not set to an instance of an object.

    is this the error you had? this worked 2 weeks ago. totally clueless about this. also, the latest template is focused on subscribing to queues (which i don’t use in this example) and lacks the famous “put your code here” spot. i want to run my job every 5 mins – so the setting is not “on demand” but “scheduled”.

    cheers,
    Gregor

    1. It’s 2015-10-02 I am still experiencing this issue.
      The only solution that worked for me was going back to nuget package Microsoft.Web.WebJobs.Publish 1.0.1 (Monday, August 18 2014 )
      It’s kind of sad that this issue has not been fixed in one year.

  2. Changing the jobRecurrenceFrequency in webjob-publish-settings.json to “Hour” worked for my https://error404.atomseo.com project!

    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.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.