Scheduling the start of a web service
-
Wrap the webservice calls in an exe and use the Windows Scheduler to invoke the exe at the required time.
only two letters away from being an asset
-
Mark Nischalke wrote:
Wrap the webservice calls in an exe and use the Windows Scheduler to invoke the exe at the required time.
:wtf: ????
What's confusing you?
only two letters away from being an asset
-
Can somebody tell me how can I programatically start a web service at a given hour, or at least point me in the right direction. I have a web service that has to start every day at a given time, but I don't know how to schedule a new start.The web service can be started once to configure the daily hour to start again. My idea is to use a second service that monitors the time of day and starts the main service at the desired moment, but I'm not sure that this is the best idea to use.
I am fighting against the Universe... Reference-Rick Cook
If this is something that doesn't really return any kind of values, why is it even written as a web service?? What does this thing do??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
What's confusing you?
only two letters away from being an asset
-
Scheduling a WebService I suppose I don't know anything but that seems contradictory to anything remotely resembling "Best Practice". And wrapping it and using the windows scheduler just seems like more of the same.
Didn't say anything about scheduling a webservice. Wrap the webservice calls in an exe and use the Windows Scheduler to invoke the exe at the required time. How would you propose to do it?
only two letters away from being an asset
-
Didn't say anything about scheduling a webservice. Wrap the webservice calls in an exe and use the Windows Scheduler to invoke the exe at the required time. How would you propose to do it?
only two letters away from being an asset
Mark Nischalke wrote:
How would you propose to do it?
Well certainly this could be misleading but the OP states it's "his" WebService:
Albu Marius wrote:
how can I programatically start a web service at a given hour
Albu Marius wrote:
I have a web service that has to start every day at a given time
Therefore he should have the code for "what" it actually does and then it seems the appropriate thing to do would be to build a Windows Service using that code. A WebService does not seem to apply at all in this situation. Again this is all based on what could be completely misleading statements by the OP.
-
Can somebody tell me how can I programatically start a web service at a given hour, or at least point me in the right direction. I have a web service that has to start every day at a given time, but I don't know how to schedule a new start.The web service can be started once to configure the daily hour to start again. My idea is to use a second service that monitors the time of day and starts the main service at the desired moment, but I'm not sure that this is the best idea to use.
I am fighting against the Universe... Reference-Rick Cook
Sorry for the late answer. It is my service and it doesn't return any values but does have to send some emails to certain people containing data at a given time of night. It has to do these operations when the server is not too busy. Now I implemented a System.Timers.Timer so that I can start the processing methods at 1 o'clock in the morning. In this case the service timer runs all day and calls the methods that process and send data. If someone can give me a better idea please try.
I am fighting against the Universe... Reference-Rick Cook
-
Sorry for the late answer. It is my service and it doesn't return any values but does have to send some emails to certain people containing data at a given time of night. It has to do these operations when the server is not too busy. Now I implemented a System.Timers.Timer so that I can start the processing methods at 1 o'clock in the morning. In this case the service timer runs all day and calls the methods that process and send data. If someone can give me a better idea please try.
I am fighting against the Universe... Reference-Rick Cook
If you are running SQL Server, then I would suggest that you create a task that sends the emails and use the SQL Server agent to manage this for you.
Deja View - the feeling that you've seen this post before.
-
If you are running SQL Server, then I would suggest that you create a task that sends the emails and use the SQL Server agent to manage this for you.
Deja View - the feeling that you've seen this post before.
Thanks for the advice but the task is far too complex for SQL Server because the emails have to be sent to a list of addresses that changes very often, the content of the emails is not the same and the scheduling for sending can be daily, monthly, yearly for each address. I decided to use timers and threads to accomplish this and also I have switched to a windows service instead of a web service.
I am fighting against the Universe... Reference-Rick Cook
-
Thanks for the advice but the task is far too complex for SQL Server because the emails have to be sent to a list of addresses that changes very often, the content of the emails is not the same and the scheduling for sending can be daily, monthly, yearly for each address. I decided to use timers and threads to accomplish this and also I have switched to a windows service instead of a web service.
I am fighting against the Universe... Reference-Rick Cook
Albu Marius wrote:
the task is far too complex for SQL Server because the emails have to be sent to a list of addresses that changes very often, the content of the emails is not the same and the scheduling for sending can be daily, monthly, yearly for each address
So store the addresses and frequency in a table. Really - it's not too complex for SQL Server - after all, you are working with data here. Don't try to overcomplicate things - step back a second and take another look at the architecture.
Deja View - the feeling that you've seen this post before.