Introduction to WebJobs in Azure website and Deployment using Portal and Powershell
Web Jobs in Azure websites are exclusive applications or writings running in the contextual of the Azure website as a background task. Below we have listed the files supported by Web Jobs as runnable tasks
- .cmd, .exe, .bat (using a Windows command prompt)
- .ps1 (using Windows PowerShell)
- .sh (Bash)
- .php
- .py (Python)
- .js (Node)
You can configure a Web Job as consistently functioning, scheduled task and on-demand basis.
Deploying an Azure WebJob using the management portal
By zipping and deploying application or writing as a .zip file with a maximum file size of 100 MBs, you can deploy a Web Job using the management portal. If you are deploying Web Job either on consistently running task or on-demand, all you have to do is specify the name of the Web Job as well as the path to the zip file. On the other hand, if you intend to deploy Web Job as a scheduled task, you will be given with a choice of configuring it as a one-time task or or Continuously Running or repetitive job. In case of a periodic job, you are allowed to set the granularity of the plan to be as small as few minutes and as large as months. Figure 1 illustrates a job that can be configured to operate after every half an hour.
FIGURE 1 Define a WebJob to run every 30 minutes
Deploying an Azure WebJob using Azure PowerShell
For deploying a Web Job by using Azure PowerShell, you need to use the New-AzureWebsiteJob cmdlet as demonstrated below:
$wjPath = "E:\Contoso-WebJob.exe" $wjName = "Contoso-WebJob" New-AzureWebsiteJob -Name $wsName -JobName $wjName -JobType Triggered -Slot $wsStaging -JobFile $wjPath
The New-AzureWebsiteJob cmdlet is capable of supporting two types of jobs including triggered and continuous jobs. The triggered jobs are similar to the on-demand tasks. Though the JobType limitations can’t assist scheduled Web Jobs.
This article is a part of 70-533 Implementing Microsoft Azure Infrastructure Solutions Prep course.
More Articles included in this course are

Creating an Azure website
Read More

Deployment slots in Azure website
Read More

Publishing an Azure website
Read More

WebJobs in Azure website
Read More

Azure website settings
Read More
Practice Tests in this course are

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 1
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 2
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 3
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 4
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 5
Read More
You must log in to post a comment.