1
votes

I have a scheduled web job created in Azure app service developed using C#. I want to change my web job from scheduled to continuous, but upon deploying the web job from visual studio it created a new instance of the web job in the Azure portal(1-Continuous and 1-Scheduled).

Duplicate Web Jobs in Azure Portal

enter image description here

webjob-publish-settings.json

  • Before: { "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", "webJobName": "SampleWebJob", "runMode": "OnDemand" }

  • After: { "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", "webJobName": "SampleWebJob", "runMode": "Continuous" }

I would like to overwrite the existing web job instead of creating a new one. Is there any way I can do it?

Also is there any way I can achieve this using ARM templates?

1
Any update on this issue?George Chen

1 Answers

0
votes

If the webjob is the same one, azure will overwrite it. And in your case actually it's the new webjob that's why it creates a new one.

If you only have one webjob and you want to change the type and don't want keep it after deployment, you could set Delete Existing Files to true.

enter image description here

If you have more than one webjob, you have to delete it on the portal or go to you web kudu site and delete it from the app_data folder.