1
votes

I have the following scenario. I have a console app (let's call it consoleapp.exe) that takes some parameter value and runs continuously. So if I have consoleapp.exe "cars" -- this will have the app run for "cars"

Now let's say, I need "animals"' consoleapp.exe "animals" -- this will have the app run for "animals"

Essentially, I need a webjob to be created and run continuously each time there is a need for a new parameter value.

consoleapp.exe "cars" --> webjob_cars

consoleapp.exe "animals" --> webjob_animals

consoleapp.exe "robots" --> webjob_robots

Which means, a webjob really gets created for the same consoleapp.exe except for different parameter values.

How do I go about accomplishing this?

1

1 Answers

0
votes

Copying Amit's answer from the other question:

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.