Reputation: 1529
I have an Azure Web Site. The site is automatically built and deployed via TFS online (visualstudio.com). The site has Web Site Mode = Standard
, and Always On = Enabled
.
I also have a continuous Azure Web Job in the form of a console application. The web job is not included in the automatic deployment. Instead it is updated manually. (Eventually I'm looking to deploy it automatically as well, but not for the moment.)
My web job runs fine, once every minute. I can follow its progress in the job log available on the Azure portal. It can run for several days without problem.
But when I deploy a new version of the web site, the web job stops, and does not start again. Unless you visit the Web Job tab on the Azure portal, then it starts again. (The web job files are not overwritten by the deployment of the web site.)
Why is this? Is there anything I can do to make it not stop, or at least start again once deployment is complete?
Upvotes: 0
Views: 908
Reputation: 3332
Do you have a kudu script for this deployment? If you look at the script that is generated with
azure site deploymentscript --dotNetConsole
There is a call to
:: 3. Run web job deploy script
IF DEFINED WEB_JOB_DEPLOY_CMD (
call :ExecuteCmd "%WEB_JOB_DEPLOY_CMD%"
)
that may kick off the process.
Though if you do already have a kudu script, looking at that generated script file you could copy over the deployment options into you existing script (make sure to have another manifest for the second kudu sync). At that point you could have a consolidated deployment with your push from TFS
Upvotes: 1