In this section we will take a look at Azure Web Job.
What is it?
A Web Job is a component that can run a piece of code as a background task. It is part of a Web App and runs a bit like a Windows Scheduled task or Windows Service.
Target Use Cases
The main places you may use a Web Job is for any background services to support your Web App. Maybe you have a Web App which writes a message to a Queue. The Web Job can process that queue in the background.
The main features of a web job are:
- Lots of language support such as .net, batch files, powershell, java
- Can run as a single instance or scale out to many instances
- Can be continuously running or scheduled
The main strength of the Azure Web Job is in its simplicity. It very easy to get up and running with a web job to solve those out of process requirements you may have.
The biggest weakness of the Azure Web Job is that it is hidden away underneath a Web App. This means that sometimes they get forgotten about.
The Web Job depends on an Azure Web App/App Service Plan and often needs the Web App to be turned to always on.
The Web Job is hosted on the same App Service Plan as the Web App. Although at this time Web Jobs are not supported on Linux Web Apps.
The cost for a Web Job is soaked up in the cost for the App Service Plan which the Web Job belongs to.
The related technologies for Web Jobs are@
Functions use the Web Job SDK. This means that they are very similar t