Microsoft Azure WebJobs

Preview:

Citation preview

MICROSOFT AZURE WEBJOBS

Kashif Imran

KashifImran@outlook.com

AZURE WEBJOBS

Programs or scripts that run in Azure Website as background tasks

Scenarios Image processing or other CPU-intensive work

Queue processing

RSS aggregation

File maintenance, such as aggregating or cleaning up log files

Running Mode On demand

Continuous

On a schedule

Acceptable File Types .cmd, .bat, .exe, .ps1, .sh, .php, .py, .js

Demo

On Demand Web Job

Demo

Continuously Running WebJob

Demo

Scheduled WebJob

WEBJOB DEPLOYMENT PROCESS

Deployment copies runtime files to the appropriate folder in the Azure Website App_Data/jobs/continuous for continuous WebJobs

App_Data/jobs/triggered for scheduled and on-demand WebJobs

Set up Azure Scheduler jobs for scheduled WebJobs. (This is not needed for continuous WebJobs.)

http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/

Demo

Deploy WebJobs using FTP

WEBJOB PROJECT TEMPLATE IN VISUAL STUDIO

The Microsoft.Web.WebJobs.Publish NuGet package

A webjob-publish-settings.json file that contains deployment and scheduler settings

Demo

Create and Deploy WebJobFrom Visual Studio

DEPLOY WEBJOB WITH WEB PROJECT

Link WebJob and Web App Projects

Deploy WebJob along with the Web App

Demo

WebJob Deployment with Web App

WEBJOBS SDK

Simplify the task of writing code that works with Azure Storage queues, blobs, and tables, and Service Bus queues.

Not a requirement to develop WebJobs

What is Included in WebJobs SDK NuGet packages

Dashboard (site extension)

Current Version 1.0.0 rc1

HELLO WORLD WEBJOBS SDK

CONNECTION STRINGS

Default Connection Strings: AzureWebJobsStorage

AzureWebJobsDashboard

Pass connection string explicitly to the JobHost object.

Demo

WebJobs using SDK

RESOURCES

http://blogs.msdn.com/b/jmstall/

QUESTIONS?

Recommended