Continuous webjob cannot start after zipdeploy
We are having issues with our continuous webjobs after deploying them via zipdeploy.
Our flow for deployment is:
- Use MSDeploy (msbuild) to publish our aspnetcore app to an azure app service
- After that completes, deploy the web jobs via ZipDeploy.
After deployment, most of the time the continuous webjobs we deploy are in the "Stopped" state, and when we go to start them in the WebJob section of the app service, we get the following error: "Failed to run WebJob". Inspecting the API traffic, it seems that call is returning a 404...
It makes a POST to subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.Web/sites/XXXX/continuouswebjobs/StewardshipActivity/start?api-version=2018-11-01, which returns a 404.
Doing az webapp webjob continuous start --name xxxx --resource-group xxxx --webjob-name StewardshipActivity also gives a 404.
This is the only log we're seeing within the jobs (3:15 is when the web app was deployed, so it's expected the jobs are stopped here.)
[10/23/2025 03:15:00 > fc69d9: SYS INFO] Status changed to Stopping
[10/23/2025 03:15:00 > fc69d9: INFO] info: Microsoft.Hosting.Lifetime[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Application is shutting down...
[10/23/2025 03:15:00 > fc69d9: INFO] info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Stopping JobHost
[10/23/2025 03:15:00 > fc69d9: INFO] info: Host.Startup[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Stopping the listener 'Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener' for function 'DailyActivity'
[10/23/2025 03:15:00 > fc69d9: INFO] info: Host.Startup[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Stopping the listener 'Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener' for function 'UpcomingActivity'
[10/23/2025 03:15:00 > fc69d9: INFO] info: Host.Startup[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Stopped the listener 'Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener' for function 'DailyActivity'
[10/23/2025 03:15:00 > fc69d9: INFO] info: Host.Startup[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Stopped the listener 'Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener' for function 'UpcomingActivity'
[10/23/2025 03:15:00 > fc69d9: INFO] info: Host.Startup[0]
[10/23/2025 03:15:00 > fc69d9: INFO] Job host stopped
[10/23/2025 03:15:00 > fc69d9: SYS INFO] Status changed to Success
[10/23/2025 03:15:00 > fc69d9: SYS INFO] Status changed to Stopped
If I go to Kudu, and go to C:\home\site\wwwroot\App_Data\jobs\continuous\StewardshipActivity, and run run.cmd, the job works without issue. So there seems to be a problem on the Azure side.