HI Friends,
I have a create a webservice and call a SQL Procedure from that service and Load the DataTable.
Now, My requirement that i have call that procedure (Update DataTable) after every 2 Hour
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two possible things going on here.
1) You need to do something to a table every two hours.
2) You need to be sure that whenever people use your WebService, something that it’s results depend on is no older than 2 hours
(1) is not something you can do with a “service”. A service is something that is accessed on demand, so it can’t natively start itself every two hours. You could, however, set up a separate process that did something every two hours, in any number of different ways, like a windows scheduled task.
(2) is quite easy, you can just keep a record somewhere (in the database, e.g.) of the last time “Update DataTable” was done, and if it has not been done within the last 2 hours, just do it then, and then continue with your usual WebService business.