Re: Implementing scheduler in web service
From: R.Balaji (rbalaji007_at_hotmail.com)
Date: 07/05/04
- Next message: Bob M.: "Help with error message"
- Previous message: John Jenkins: "Re: Access denied problem."
- In reply to: Yi: "Implementing scheduler in web service"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 5 Jul 2004 11:13:11 +0530
Hi,
Create a windows service which does the scheduler job to fire some command
every 15/30 minutes.
Create a webservice as a monitoring/controlling service for the windows
service.
You can use some registry entry/xml file/database table to share the
information between the webservice and the windows service.
Regards,
R.Balaji
"Yi" <huskerchen@hotmail.com> wrote in message
news:be309a37.0407020614.5b537c83@posting.google.com...
> Hi, I am implementing a scheduler that will fire a command every 15 or
> 30 minutes. I would like to use web service interface to control the
> timer (start, stop, etc). I think a workable solution is to implement
> the timer in a Windows Service and use the web service to minotor and
> control the windows service, but I don't like the "web service +
> windows service" solution.
>
> It would be better if everything is in the web service package. The
> goal is taht when a "StartScheduler" web method is invoked, a timing
> logic starts to run on the server and call a set of commands every 15
> minutes, and a "StopScheduler" web method is called the timer is
> stoped.
>
> I tried to use a System.Timers.Timer object in the web service class
> as shown in the following but it doesn't work. I tried to store the
> timer in a session object but it still doesn't work. Any suggestions
> on how to implement this? Thank you very much!
>
> -Yi
>
>
> ---
> [WebMethod]
> public void StartScheduler()
> {
> timer = new System.TImers.Timer();
> timer.enable();
> timer.start();
> }
>
> [WebMethod]
> public void StopScheduler()
> {
> timer.stop();
> }
- Next message: Bob M.: "Help with error message"
- Previous message: John Jenkins: "Re: Access denied problem."
- In reply to: Yi: "Implementing scheduler in web service"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|