Reputation: 2618
I would like to create a background task which continuously inputs the location from a mobile to a database and in a website, I would like to get the same location immediately as it changes.
I am using an SQL Azure database. so pushing and polling are not an option. Also I am not sure if I can use a cache since the location continuously changes.
I think I have to create some infinite loop which carries on a task continuously. But how does this concept work?
Does this simply involve the create of a thread and a while(true) { ... } ?
Upvotes: 0
Views: 317
Reputation: 21034
I worked on a similar situation, and the approach I went for was to have an special page (/StartJob.aspx?AccessKey=xxxxxxxxxxxxx), that when hit with the right access key, would start a job cycle.
I then setup a "Cron Job" using www.setCronJob.com, to call this page at regular intervals. This service can notify you by email if it fails too.
Upvotes: 1
Reputation: 792
Have a look at the timer control
http://msdn.microsoft.com/en-us/library/bb386404.aspx
sounds like something that could help out with achieving what you need :)
Upvotes: 0