1
votes

I'm deploying webjob to Azure using VS2015, but cannot find way to add command line in webjob-publish-settings.json. Is there any way to do it?

2
Is the WebJobs continuous or triggered? Also, do you want to pass a constant command line, or one that varies?David Ebbo
It is continuous. I want to pass constant command line like /doSomethingMookker

2 Answers

9
votes

You can do this in the following way:

  • Add a run.cmd file to your WebJob in VS (same place as your Program.cs)
  • Make sure to set this file's Copy to Output Directory to Copy if newer (in the file properties)
  • In that file, just add one line that has: NameOfYourExe.exe /dosomething

When deployed to Azure (under D:\home\site\wwwroot\app_data\jobs\continuous\MyContinuousWebJob), this file will take precedence of the .exe, and will end up running the .exe with your params.

0
votes

Arguments are not part of the definition of the json:

webjob-publish-settings.json definition

So adding them is not possible in the current version.