4
votes

I have a very basic C# console app, which I would like to run in Azure, on a scheduled basis, like every day at 3am, for instance. I'm after some advice on the best way to implement this in Azure.

I should mention that I already have another, very similar app, for which I created a Cloud Service and Worker Role, which in essence, sits in a loop until 3AM, does some stuff then goes back to waiting. It struck me that I'm probably wasting money with this approach and that there must be a better way.

So, I did "some" research, and so far I've come-up with WebJobs and the Azure Scheduler Service but alas, neither of these A) make a lot of sense to me (at the moment, until I do more research) or B) appear to be very straight forward if all I want to do is run a simple console app once every 24 hours.

I guess I'm trying to shortcut my research because I don't want to go researching one specific method if it's not the best method for me.

So, what I'm trying to ask, in a VERY long-winded way, is....Given that I have a very simple C# Console App, what is the preferred method for "hosting" this in Azure so that I can run it in a scheduled fashion?

2
This reference page appears to be comprehensive, and it doesn't appear to be onerous in terms of research time.Robert Harvey
Thanks Robert. Very helpfulMark Mayes

2 Answers

3
votes

I believe that the easiest way is a Webjob on Website.

0
votes

You can create a Worker Role and implement the scheduling using Quartz.NET.

Check out this link to see how to do it: "Using Quartz.Net to Schedule Jobs in Windows Azure Worker Roles"