Webjobs are missing after deployment of App Service or web app
Issue:
· My web jobs are
deleted after deployment.
· I am not able
to see webjobs in the portal
· I am sure I
haven’t deleted it
Solution:
This is very
common scenario. Many users face this issue which is very critical sometimes as
web job can be performing some critical business scenario.
One important
point which everyone should know is, webjobs are deployed inside App_Data
folder inside WWWROOT of your app service.
The complete
path depends on type of webjobs.
Triggered webjobs
path - WWWROOT\app_data\jobs\triggered\ {job name}
Continuous webjobs
path- WWWROOT\app_data\jobs\continuous\ {job name}
You can see clearly
that both webjobs are stored inside the app_data folder.
Now due to some
reason if either App_Data folder is deleted during deployment or we publish web
app with option “remove additional files at destination” while App_Data folder
is not part of source code then it will delete existing App_Data Folder.
Here I am
giving example for DevOps aka VSTS where we have 2 options,
·
Remove additional files at destination
·
Exclude files from the App_Data folder
You can check
this in the official document also,
I believe this
explains the issue and help us to understand why my webjobs are missing.
Make sure you take
care of this checkbox during deployment if you have any web job.
when you say "make sure you take care of this checkbox" do you mean check or uncheck. Also does this apply to both checkboxes?
ReplyDeleteIt depends on your requirement.
DeleteURL : https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment?view=azure-devops#web-deploy
explains the purpose of both checkbox.