Search code examples
azureazure-webjobsazure-scheduler

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


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


Solution

  • 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.