Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Azure Web Jobs and Azure Scheduler in Microsoft Azure?

Can anybody explain the difference between Azure Web Jobs and Azure Scheduler

like image 534
Ondipuli Avatar asked Jun 25 '14 13:06

Ondipuli


2 Answers

Azure Web Jobs

  1. Only available on Azure Websites
  2. It is used to run code at particular intervals. E.g. a console application every day
  3. Used to trigger and run workloads.
  4. Mainly recommended for workloads that either scale with the website or are relatively small.
  5. Can be persistently running if "Always On" selected, otherwise you will get the 20 min timeout.
  6. The code that needs to be run and schedule are defined together.

Azure Scheduler

  1. Is not tied to Websites or Cloud Services
  2. It allows you to call a website or add a message to a storage queue
  3. Used for triggering events or triggering small workloads (e.g. add to queue), usually to trigger larger workloads
  4. Mainly recommended for triggering more complex workloads.
  5. This is only a trigger, and a separate function listening to trigger events (e.g. queue's) needs to be coded separately.

For many instances I prefer to use the scheduler to push to a storage queue and a worker role on each instance takes off the queue. This keeps tasks controlled granularly and can also move up or down in scale outside of your website.

With WebJobs they scale up and down with your site and hence your background tasks can become over taxed if your website is experiencing low traffic and scaled down.

like image 151
Adam Avatar answered Sep 30 '22 09:09

Adam


Azure Scheduler - Provides a way to easily schedule http calls in a well-defined schedule, like every hour, every Friday at 9:00 am, Once a day, ...

Azure WebJobs - Provides a way to run small to medium work load (in the form of a script: .exe, .cmd, .sh, .js, ...) at the same context of an Azure Website (but can be hosted even with an empty website).

While a WebJob can run continuously (with a process that has a while loop) and Azure will make sure this WebJob is always running (with "Always On" set).

There is also an integration between Azure scheduler and Azure WebJobs where you have a WebJob that is running some finite work and the schduler is responsible for scheduling this work (invoking the WebJob).

So in summary, the scheduler is about scheduling work and WebJobs is about running work load.

like image 40
Amit Apple Avatar answered Sep 30 '22 09:09

Amit Apple