3

I am trying to deploy multiple WebJobs. The WebJobs are tied on a WebApp. Recently, I have noticed that the 'Run Command' on the WebJobs are different than the expected ones. So if the WebJob name is 'CopyFileWebJob', the Run Command for this WebJob should ideally be 'CopyFileJobWebJob.exe', but instead its a different 'exe' file that we added as a dependent package from NuGet. Please note that in order to deploy the WebJobs, we just publish the WebApp and that takes care of deploying all the WebJobs tied to it.

I am checking the 'Run Command' from WebJobs's log page which is available on the new Azure portal.

Is there a way to manually set what command the Azure WebJob should invoke? Thank you.

Abhijit
  • 141
  • 1
  • 9

2 Answers2

5

The URL of the WebJob is correct, I did double check that. As we started looking more into this, we came across this article: https://github.com/projectkudu/kudu/wiki/WebJobs

In the section where they have described the logic they use to decide which file the script should run within the job's director, they have mentioned that "Webjobs looks for "run.*", and if it can't find one, it looks for any valid extension in alphabetical order.".

So, we renamed the 'Assembly Name' for the WebJob project to 'Run' and that caused the WebJob to compile into Run.exe and after we published it, the Run Command was set to 'Run.exe'.

Abhijit
  • 141
  • 1
  • 9
0

Azure portal enables us to check WebJob Run Details/Logs by selecting WebJob and clicking Logs icon.

enter image description here

Recently, I have noticed that the 'Run Command' on the WebJobs are different than the expected ones. So if the WebJob name is 'CopyFileWebJob', the Run Command for this WebJob should ideally be 'CopyFileJobWebJob.exe', but instead its a different 'exe' file

Do you mean that you find the run command is not CopyFileWebJob.exe when you select CopyFileWebJob and check the logs of it? I link multiple WebJob applications to a web project, and deploy web project with WebJobs to Azure app service web app, I do not encounter the issue as yours. Please make sure if the url of WebJob CopyFileWebJob Details looks like https://{appname}.scm.azurewebsites.net/azurejobs/#/jobs/continuous/CopyFileWebJob.

Fei Han
  • 26,415
  • 1
  • 30
  • 41