1

I would like to know what is the real benefit of using azure web job sdk in web job.

I have some business logic to be executed without any interaction with storage,service bus.It is interacting with Sharepoint and Azure Sql. I have checked question here -Basic of Azure WebJobs SDK which says JobHostConfiguration is not required for the job.

In which cases the JobHostConfiguration and webjobs sdk will be required and why we should use that?

1 Answers1

0

WebJobs 3.x targets .NET Standard 2.0. This means you can use it from a .NET Framework application or a .NET Core 2.x application, the choice is up to you. If you want to make a .NET Framework application that uses WebJobs, then follow the same guide but with a .NET Framework console app as the starting point (instead of .NET Core).

If you're planning on deploying this webjob to a webapp that is running a .NET Framework application, I think it makes sense to use .NET framework for the webjob too.

You can refer here for more details on Webjobs Host.

Webjob SDK Version 2.x The JobHostConfiguration class has a UseDevelopmentSettings method that enables development mode. The following example shows how to use development settings. To make config.IsDevelopment return true when it runs locally, set a local environment variable named AzureWebJobsEnv with the value Development. Please let me know if this helps.

  • My question was more inclined towards,the real use of web job sdk while implementing web job as we can implement web jobs without using JobHostConfiguration. In which cases we need to use JobHostConfiguration and in which cases we can ignore it.(Focusing only .net framework web job) – Ashwinee Vaishampayan Jun 03 '19 at 04:53
  • Instance of the JobHostConfiguration object is used to configure the properties of your WebJob like UseTimers, MaxDequeueCount , MaxPollingInterval etc. https://www.spdavid.com/azure-web-jobs-c-sharp/ The 3.0.0 NuGet package update (non-beta) brought breaking changes. It's based on the generic host which is similar to the asp.net host. https://github.com/Azure/azure-webjobs-sdk/issues/1870 Webjob sdk 3.0 onwards we came with generic host so its removed. – DashleenBhandari-MSFT Jun 03 '19 at 09:13
  • if we do not use webjobs SDK, it also does not integrate the logs with Storage account. It only puts logs on VM on which job runs.Is this also a difference? – Ashwinee Vaishampayan Apr 06 '20 at 13:28