What is Azure WebJob?
- Pre-requisite Knowledge –
Before we start with the understanding of what is Azure WebJob, we should know –
- Introduction of Azure WebJob –
Most of the applications can have dependent functionalities example when we add any item in Azure blob storage queues, blobs, service bus queues, etc. then perform certain processing, another example is sending an email daily to the users. These types of functionalities are called event-driven background processing.
Azure WebJob helps us to run the business logic at the background recurrently or on certain events. Hence Azure WebJob is famous as an ‘event-driven background processing’ method. Azure WebJob can run continuously, on-demand or schedule or manually too. Azure WebJob is part of the platform as a service (PaaS) meaning pay as you use. Azure WebJob runs under the context of the web app, API app or mobile app. If you need a higher number of resources to execute the Azure WebJob then the entire service plan needs to be upgraded. We can easily monitor the Azure WebJob run history using the Azure portal. We can publish multiple WebJobs to a single web app.
Azure WebJob can run the program or script at the background. Below is the list of supported file types –
- .cmd, .bat, .exe (using Windows cmd)
- .ps1 (using PowerShell)
- .sh (using Bash)
- .php (using PHP)
- .py (using Python)
- .js (using Node.js)
- .jar (using Java)
There are two major types of Azure WebJob –
- Continous – The Azure WebJob is continuously running at the background or run of events. We need to keep ‘Always ON’ setting enabled on the Azure WebJob for such type of WebJob. It supports remote debugging.
- Triggered – Run only when triggered manually or on a schedule. It doesn’t support the remote debugging.
When we create Azure WebJob in the Azure then below are the important settings
- Name – Name of AzureWebJob
- File Upload – Upload the output file program like a zip file of executables or scripts.
- Type – Continuous/ Triggered
- CRON Expression – CRON expression has numbers to indicate the time to run the Azure WebJob. The numbers in a CRON expression refer to a time and date, not a time span.
- Next - Get started with the Azure WebJobs SDK
- References –
Conclusion - In this article, we have learned the overview of Azure WebJob.