iLikeCloudSQL
iLikeCloudSQL

Reputation: 41

How to define the default exe in a webjob that has multiple console app projects?

I have a console app solution with multiple projects that I deploy as Azure Webobs. The deployment goes through fine but the webjob doesn't know anything about the startup project in solution. When executing the webjob it picks the first .exe file from the list and runs it. this is not correct and need to know how can I enforce the startup project to webjobs. Want to mention that I can run the startup exe from azure webjob console manually but scheduled process doesn't know about the startup exe when running.

Upvotes: 2

Views: 2547

Answers (1)

Tom Sun
Tom Sun

Reputation: 24549

We could get answer from the official document.The following is the snippet from the document. If we want to run .exe firstly, we could name it run.exe.

we use the following logic to decide which file is the script to run within the job's directory: Per file type we look first for a file named: run.{file type extension} (for example run.cmd or run.exe). If it doesn't exists for all file types, we'll then look for the first file with a supported file type extension. The order of file types extension used is: .cmd, .bat, .exe, .ps1, .sh, .php, .py, .js.

The following file types are accepted as runnable scripts that can be used as a job:

  • fsx (using the F# fsi.exe interactive compiler)
  • cmd, .bat, .exe (using windows cmd)
  • ps1 (using powershell)
  • sh (using bash)
  • php (using php)
  • py (using python)
  • js (using node)

Upvotes: 5

Related Questions