Can multiple Azure websites share the same assemblies?

I have an Azure WebJob that needs to be run in 4 different ways and at different times using 4 different command line parameters. I can set options with run.cmd but it seems like a waste of space has 4 sets of assemblies. It is possible to define multiple webjobs that run the same set of assemblies from the same folder. Each webjobs will have only one run.cmd which called the exe from that folder.

+2


source to share


1 answer


This is not possible out of the box.

There is a way to do this, but you can have one directory with your binaries (in some place on your site, for example:) d:\home\site\wwwroot\app_data\jobs\common

, and have your WebJob only as one run.cmd

script each with appropriate arguments calling that shared directory:



@echo off
d:\home\site\wwwroot\app_data\jobs\common\DoWork.exe job1

      

The problem is the update history, when you need to update these shared WebJobs binaries, you need to stop your WebJob first, as the files will probably get locked and start after.

+3


source







All Articles