Azure Task Scheduler Azure Task Scheduler azure azure

Azure Task Scheduler


You can set up a Service Bus Queue and use that as the scheduler.

Send messages into the queue by setting ScheduledEnqueueTimeUtc on the message to the desired time and the message will show up in the queue at that time. In the executing worker/web role you set up a receiver on that queue and that will then get the job as soon as the message shows up, i.e. the job is due.

The nice thing about that is that you can use this to balances jobs across multiple instances and since the timer is completely external to your app you don't have to store and resurrect and manage it. SB does all that for you.

One caveat: SB doesn't have facility to cancel scheduled messages.


There are now a couple of options for doing this on Azure


Duplicate of: Recommend a C# Task Scheduling Library which recommends Quartz.Net. I have recently worked on a project that used this successfully under Windows.