In Windows Azure, you can choose the Web or Worker role (both mostly Windows 2008 Server R2 and SP2) and have a specific time type, as suggested by @Lucifure. You can also run a scheduler, such as Quartz.net, or use Windows Azure queues or service bus queues to display messages at specific times. Nevertheless: you cannot have the task “forever” in the given instance of the role, since periodically your virtual machine instances will be rebooted (for example, to service the host operating system every month). When you turn off features, you’ll receive a notification that you can process with shutdown notifications in Stopping()orOnStop(). If you have multiple instances, you can use a scheduler or queue to ensure that your events are still triggered every 50 seconds or so, and process them through multiple instances (but only by one instance at any given time).
To store information in memory, one idea is to store this information in a cache. You have 2 options:
- A distributed (shared) cache service that has been around for some time. It works regardless of role instances.
- A memory cache introduced only in June 2012. Assuming you have multiple instances, the cache is distributed across those instances. You can even run a cache inside the memory of your existing roles.
More information on caching here .
StackOverflow Quartz.net Windows Azure, .