Can multiple Azure webjobs share the same assemblies?

邮差的信 提交于 2019-11-30 07:50:57

问题


I have an Azure WebJob that needs to be run 4 different ways and at different times, using 4 different command line parameters. I can set the parameters with a run.cmd but it seems like a waste of space to have 4 sets of assemblies. Can multiple webjobs be defined that run the same set of assemblies, from the same folder. Each webjobs would just have a single run.cmd that called the exe from that folder.


回答1:


This is not possible out of the box.

There is a way to do it though but at a cost, you can have one directory with your binaries (at some place on your site for example: d:\home\site\wwwroot\app_data\jobs\common) and have your WebJobs only as one run.cmd script each with the proper arguments calling to that common directory:

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

The problem is the update story, when you need to update these common WebJobs binaries you'll first have to stop your WebJobs since the files will probably be locked and start them afterwards.



来源:https://stackoverflow.com/questions/25735831/can-multiple-azure-webjobs-share-the-same-assemblies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!