JamesBrownIsDead
JamesBrownIsDead

Reputation: 61

ASP.NET: Scheduled tasks

While the economy has been in the shitter, I've written possibly the most coolest site EVER for unemployed developers looking to buzzword-ify their resumes. (Don't hate the player, hate the game.)

The only problem is, it needs a scheduled task to run once a day to do some data mining. I spent many, many hours a few months ago researching solutions, but nothing seemed sure-fire.

If I have shared hosting and cannot remote in (e.g. mstsc and create a Schedule Task), how can I create a task that will run once a day on the backend of an ASP.NET website?

After all the research I did, I don't think it's possible. Per my last analysis, someone has to visit the site at least once a day to instantiate an instance of HttpApplication.

Does anyone have any solution to making sure an operation runs automatically, no matter whether anyone visits the site, and without anything but FTP access to the website?

Like I said, I've done A LOT of looking into this in the past, and it didn't seem possible. IF YOU HAVE EXPERIENCE implementing a solution, please, contribute your advice! But not postulating or conjecturing needed--it's far more nuanced and difficult than you're surely imagining.

Upvotes: 6

Views: 2033

Answers (6)

user172163
user172163

Reputation:

You can use ATrigger scheduling service. A .Net library is also available to create scheduled tasks without overhead.

You can set to call your datamining URL every 1day. Related example: http://atrigger.com/docs/wiki/17/use-case-delayed-processing

Benefits:

  • Reporting
  • Error Log
  • Tasks List
  • Great Timing Features

Disclaimer: I was among the ATrigger team. It's a freeware and I have not any commercial purpose.

Upvotes: 0

Matt Dotson
Matt Dotson

Reputation: 5955

I agree with HackedByChinese, but if you don't want to run it from your desktop, you could get something like http://aremysitesup.com/ to ping your site for you.

Upvotes: 1

D'Arcy Rittich
D'Arcy Rittich

Reputation: 171351

Can you schedule a task in SQL Server that could call a CLR function? Your hosting provider may not allow either ot both of those, but if they do, then you are golden.

Upvotes: 0

JonnyBoats
JonnyBoats

Reputation: 5187

DotNetNuke which is a popular open source .net content management system does this. You can download the source and see exactly how they did it.

Upvotes: 1

Michael
Michael

Reputation: 20049

You could have a look at Quartz.NET for scheduling jobs.

Upvotes: 1

moribvndvs
moribvndvs

Reputation: 42497

I had a similar problem. I wrote a cheap utility that issued a web request from my desktop to my web app on a regular schedule.

How To: Send Data Using the WebRequest Class

Upvotes: 2

Related Questions