I have an ASP.NET MVC 5 project with database and external JSON file that is updated once a day, by third-party website. What I'm trying to do is to update my DB once a day accordingly with the JSON (the precision is not the issue here). Currently I'm using a button that call to Action that parsing the JSON and update the database, and I want to do it automatically. As far as I understood, running the scheduled task from the MVC application is bad practice and risky, and running external dedicated service is preferred.
If I understood it correctly, I can make a console application that will parse the JSON and update the DB automatically, but I'm not sure if this console application can run on the windows server, and if so, how to do it (and I'm also not sure that this is really good idea).
So, I would be very happy if you can advise me here.
Thanks.
Finally the solution was to build a console application that parse JSON and updating the database. Then, I used the built-in task scheduler in my hosting control panel to run the application (in my case the control panel is plesk)