Why Azure WebJobs blade is showing no webjobs

1.6k views Asked by At

Basically i am curious why the WebJobs blade for my App Service shows 0 webjobs ("You haven't added any WebJobs. Click ADD to get started"). And of course, when i click Add, i get "WebJob cannot be added from portal if development from source control is configured.").

I am following this guide. As with almost any technical guide, things get outdated very quickly and frequently. So i'm trying to following this the best i can.

Note that my snippet (taken from the link) essentially looks like this:

class Program
{
    static void Main()
    {
        config = new JobHostConfiguration();
        var host = new JobHost(config);
        host.RunAndBlock();
    }
}

To paraphrase: I am not see my WebJob under my App Service.

Question: Based on this link/guide, the WebJob simply exists in the solution. There is the Program.cs (the entry point of the app service/host), and then there is the WebJob itself ( Functions.cs, which has a basic implementation with a QueueTrigger("queue") ). Why is the WebJob not showing up under the WebJobs blade under the App Service?

1

There are 1 answers

1
Joey Cai On

If you have source control configured with your application, the webjobs should be deployed as part of the source control integration.

Form App Service perspective a webjob is just part of the content of the app.

If you deploy a webjob through the portal and then had a commit to your source control, then the webjob would be removed since it wasn't part of the payload being published by source control.

The right way to do this is to make sure webjobs are part of your solution.

As a workaround, you can deploy webjobs through FTP/FTPS but keep in mind they will be removed the moment source control does the next deployment.

Or you could upload the webjobs directly via the Kudu Console.

Open the Kudu Console by selecting "Advanced Tool" --> "Go" in Your App Service on the Azure Portal then Go to the directory for your webjobs: d:\home\site\wwwroot\app_data\jobs\continuous\{job name} drag and drop the .zip file you prepared to upload your webjob