0
votes

I am trying to get an Azure App Service to recognize my Web Job - meaning to show it in the portal under "Web Jobs" in the App Service. And to also run it on the schedule defined with a TimerTrigger attribute.

It is a .NET Core 2.2 Console Application with multiple web job classes in it. The App Service it runs within is a separate project and web site. I am able to publish it from Visual Studio and it shows as it should under Web Jobs in the Web App. But if I delete it and try the publish from Octopus to the same place WITHOUT doing the VS 2017 publish first, it won't show up.

My issue is that in a new environment, the Web Job does not get created when I use Octopus to deploy the Web Job files as described here:

http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs

by setting the physical path in my Octopus package deployment:

App_Data\jobs\continuous\myjob

This is the same path as when I publish from Visual Studio 2017.

Related to this question, but there seems to be a step missing since the files are in the right place, but the web job does not appear in the portal.

How to deploy azure webjob using Octopus

Is there some additional ssetup or registration step for the Web Job to run or should the App Service just recognize the web job is there when the files appear in the correct place? Restarting the app service does not help.

1

1 Answers

0
votes

Since you have a web app along with a web job, I would follow the steps outlined at https://octopus.com/docs/deployment-examples/azure-deployments/deploying-a-package-to-an-azure-web-app/deploying-web-jobs. You can build your project using .nuspec to get your .npkg and push/upload the package to Octopus.

Hope that helps.