1
votes

Are Azure WebJobs get deleted each time when I redeploy? I found those WebJobs mysterious disappeared, so I guess maybe it's because I redeployed my app but didn't go to Azure portal to re set WebJobs again.

If that's the case, it is really a trouble to re set WebJobs again and again. Is there a way to automate this?

I deploy from Visual Studio. I read somewhere saying I can put my WebJobs (e.g. xxx.ps1) under App_Data/jobs/continuous/, and then whenever I deploy, the WebJobs will be deployed automatically. I did that, but I didn't see those WebJobs in my Azure portal.

1
Is your intention to deploy your WebJobs with your app, or separately via the portal?David Ebbo
I would prefer to deploy together with appmartial
If you're deploying the app and WebJobs together, I can't explain why a deployment would remove them. So you mean the same VS deployment that added them the first time removed them the second time?David Ebbo
I currently don't deploy them together - that's why webjobs are deleted I think. I want to know how I can deploy them together, I tried that App_Data/jobs/continuous/ approach, but it seems not work.martial

1 Answers

0
votes

See https://docs.microsoft.com/en-us/azure/app-service-web/websites-dotnet-deploy-webjobs for instructions on how to add WebJobs to your Web App from VS. Note that you don't need to worry about the App_Data/jobs/continuous folder, as that's taken care of by VS deployment.

Note that this is supported for ASP.NET but not yet for ASP.NET Core.