V
V
Valery Abakumov2014-07-18 23:26:53
ASP.NET
Valery Abakumov, 2014-07-18 23:26:53

What is the best way to implement a daily update of exchange rates in the database for ASP.NET MVC?

Good afternoon friends!
There is a site on ASP.NET MVC + EntityFramework + SQL Server. Deployed on regular Windows hosting. The database contains a table with current exchange rates. What is the best way to implement daily automatic updating of these exchange rates? Of course, you can write a windows-service (which would be launched on some always-on PC, "break" once a day on some site such as the Central Bank of the Russian Federation, RBC, etc., would receive the values ​​of current exchange rates from there and update these courses in the database), but, again, the site is deployed on the hosting (and as a result, there is no possibility to deploy a Windows service there). How would you implement or would implement a similar task?
UPD : is it possible to somehow use ASP.NET WebAPI or WCF to solve this problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Valery Abakumov, 2014-09-10
@Valeriy1991

As a result, a friend found an alternative solution .
We wrote a console application that takes the latest exchange rates from the Central Bank of the Russian Federation service and calls a stored procedure from the database that accepts a table type and updates the exchange rates in the database. In the hosting control panel you are currently using, there is a "task scheduler" tool (in general, the Windows scheduler). In the settings, you specified the path to the console application, set the periodic launch of this application once a day - and voila! Problem solved.
Nevertheless, thanks to everyone for the replies.

A
Alexander, 2014-07-20
@avorsa

as your heart desires

A
Anton, 2014-07-27
Bruilo @AntonBruilo

Implementations, it seems to me, you can invent a bunch.
As for exchange rates, their values ​​can change more than once a day. Therefore, it is better to update constantly.
I wouldn't link the exchange rates to the internal database at all. I see no reason to store such information there. Would transfer each time new data to the user, receiving them from

some site like the Central Bank of the Russian Federation, RBC and so on.
.

A
Andrew, 2014-08-11
@actinogr

I myself faced a similar task (Jobs on a schedule on a shared hosting) and a good one caught my eye www.mikesdotnetting.com/Article/254/Scheduled-Task...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question