Geeks With Blogs
Charlie Mott

Currently, the Azure PaaS does not offer a distributed\resilient task scheduling service.  If you do want to host a task scheduling product\solution off-premise (and ideally use Azure), what are your options?

Update: 09/01/2013 - There is a new way to schedule tasks in Windows Azure using the Scheduler (preview) provided with the Azure Mobile Services. See

Update: 25/01/2013 - Yet another option. The new Azure “Add-on Store” has a scheduler.

Update: 13/12/2013 - Finally there is a Windows Azure Scheduler Service.  See:



Option 1: Worker Roles

Use a worker role to schedule and execute actions at specific time periods.  There are a few frameworks available to assist with this:

I found the Azure Toolkit option the most simple to implement. 

Step 1 : Create a domain entity implementing IJob for each job to schedule.  In this sample, I asynchronously call a WCF service method.

   1:  namespace Acme.WorkerRole.Jobs
   2:  {
   3:      using AzureToolkit;
   4:      using ScheduledTasksService;
   6:      public class UploadEmployeesJob : IJob
   7:      {
   8:          public void Run()
   9:          {
  10:              // Call Tasks Service
  11:              var client = new ScheduledTasksServiceClient("BasicHttpBinding_IScheduledTasksService");
  12:              client.UploadEmployees();
  13:              client.Close();
  14:          }
  15:      }
  16:  }
Step 2 : In the worker role run method, add the jobs to the toolkit engine.
   1:  namespace Acme.WorkerRole
   2:  {
   3:      using AzureToolkit.Engine;
   4:      using Jobs;
   6:      public class WorkerRole : WorkerRoleEntryPoint
   7:      {
   8:          public override void Run()
   9:          {
  10:              var engine = new CloudEngine();
  12:              // Add Scheduled Jobs (using CronJob syntax - see
  14:              // 1. Upload Employee job - 8.00 PM every weekday (Mon-Fri)
  15:              engine.WithJobScheduler().ScheduleJob<UploadEmployeesJob>(c => { c.CronSchedule = "0 20 * * 1-5"; });
  16:              // 2. Purge Data job - 10 AM every Saturday
  17:              engine.WithJobScheduler().ScheduleJob<PurgeDataJob>(c => { c.CronSchedule = "0 10 * * 6"; });
  18:              // 3. Process Exceptions job - Every 5 minutes
  19:              engine.WithJobScheduler().ScheduleJob<ProcessExceptionsJob>(c => { c.CronSchedule = "*/5 * * * *"; });
  21:              engine.Run();
  22:              base.Run();
  23:          }
  24:      }
  25:  }
Pros Cons
Azure Toolkit option is simple to implement. For the AzureToolkit option, you are limited to a single worker role.  Otherwise, the jobs will be executed multiple times, once for each worker role instance.
  Paying for a continuously running worker role, even if it just processes a single job once a week.  If you only have a few scheduled tasks to run calling asynchronous services hosted in different web roles, an extra small worker role likely to be sufficient.  However, for an extra small worker role this still costs $14.40/month (03/09/2012).

Option 2: Use Scheduled Task on Azure Web Role calling a console app

Setup a Windows Scheduled Task on the Azure Web Role. This calls a console application that calls the WCF service methods that run the task actions. This design is described here:

Pros Cons
Fairly easy to implement. Supportability - I RDC’ed onto the Azure server and stopped the scheduled task. I then rebooted the machine and the task was re-started. I also tried deleting the task and rebooting, the same thing occurred. The only way to permanently guarantee that a task is disabled is to do a fresh deployment. I think this is a major supportability concern.
  Saleability - multiple instances would trigger multiple tasks.
You can only have one instance for the scheduled task web role. The guidance implements setup of the scheduled task as part of a web role instance. But if you have more than one instance in a web role, the task will be triggered multiple times for each scheduled action (once per machine).
Workaround: If we wanted to use scheduled tasks for another client with a saleable WCF service, then we could include the console & tasks scripts in a separate web role (e.g. a empty WCF service with no real purpose to it).


Option 3: Azure Marketplace

I thought that someone might be offering this type of service via the Azure marketplace. At the point of writing this blog post, I did not find anyone doing so.

Pros Cons
  Nobody currently offers this on the Azure Marketplace.

Option 4: Online Job Scheduling Service Provider

There are plenty of online providers that offer this type of service on a pay-as-you-go approach.  Some of these are free for small usage.   Many of these providers are listed here:

Pros Cons
No bespoke development for scheduler. Reliance on third party.


Option 5: Setup Scheduling Software on Azure IaaS VM’s

One of job scheduling software offerings could be installed and configured on Azure VM’s.  A list of software options is listed here:

Pros Cons
Enterprise distributed\resilient task scheduling service VM Setup and maintenance
  Software Licence Costs

Option 6: VM Gallery

A the time of writing this blog post, I did not spot a VM in the gallery that included pre-installation of any of the above software options.

Pros Cons
  No current VM template.


For my current project that had a small handful of tasks to schedule with a limited project budget I chose option 1 (a worker role using the Azure Toolkit to schedule tasks). 

If I was building an enterprise scale solution for the future, options 4 and 5 are currently worthy of consideration.

Hopefully, Microsoft will include tasks scheduling in the future as part of their PaaS offerings.

Posted on Monday, October 8, 2012 7:59 PM | Back to top

Comments on this post: Azure Task Scheduling Options

# re: Azure Task Scheduling Options
Requesting Gravatar...
There is a new way to schedule tasks in Windows Azure with the new Job Scheduler. More information:
Left by Sandrino Di Mattia on Dec 28, 2012 1:28 AM

# re: Azure Task Scheduling Options
Requesting Gravatar...
Thank you Sandrino. I have switched my system to now use the "Azure Mobile Services Scheduler." For my needs, this is even better than the Worker Role (w/ Azure Toolkit). I will update this blog post shortly with the pros\cons of this new offering.
Left by Charlie Mott on Jan 09, 2013 9:15 PM

# re: Azure Task Scheduling Options
Requesting Gravatar...
Yet another option. Looks like the new Azure “Add-on Store” has a scheduler.

Left by Charlie Mott on Jan 24, 2013 9:34 AM

Your comment:
 (will show your gravatar)

Copyright © charlie.mott | Powered by: | Join free