user3233557
user3233557

Reputation: 35

Azure mobile services scheduled job - Are there alternatives to using javascript?

Background - I am working on a Windows Phone RSS reader app (using C#). In addition to just reading RSS content, the app does some scraping on the articles linked by the feeds to get additional info. This is turning out to be too resource/bandwidth intensive to be done on the client and I am thinking of moving the RSS aggregation and scraping logic to the cloud.

I want to use Azure mobile services. In my simple design, I want to have- (1) an Azure DB, which stores all the RSS data including the scraped content. (2) Front end service which clients can call to get this data (3) A scheduled task in the cloud that keeps the DB up to date with the latest RSS content. The processing here will be heavy weight since it will scrape thousands of webpages, process them to get additional information, and then update the DB.

* Actual question * My question is regarding (3). I already have C# code that does this on the client and I want to be able to reuse it in developing the scheduled task in the service. I read the Azure mobile services documentation. What they seem to have is a scheduled job which runs javascript. I don't want to use java script and would prefer to reuse my C# code. What is a recommended (and non-hacky) way for me to do that?

Upvotes: 0

Views: 1060

Answers (2)

Amit Apple
Amit Apple

Reputation: 9192

You can use Windows Azure WebJobs: http://www.windowsazure.com/en-us/documentation/articles/web-sites-create-web-jobs/

Just create a new (empty) website in Windows Azure, go to the "WEB JOBS" tab and add a new WebJob.

There you can upload your .NET console application which has all your logic (zipped), set a schedule according to your needs and you can use the web sites connection string setting (under the "CONFIGURE" tab) to set your connection string.

Upvotes: 2

Chris
Chris

Reputation: 3017

As of today, there isn't any option to run anything but javascript from your Mobile Service. HOWEVER, if you already have the C# code to perform #3, I would recommend wrapping that in a very light weight Web Service (Web API, etc). You can host this from Windows Azure Websites. You can then use the Windows Azure Scheduler to schedule a ping of that service which will kick off your job. You could use the Mobile Services scheduler to ping it as well but using the WA Scheduler would be even easier.

Upvotes: 2

Related Questions