thread scheduling, how??

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hey

..NET 2.0

I'm working on a winservice created in .NET 2.0. Now I want to do some
modications to this winservice. I want this winservice at every start of a
new month to start a thread which pulls data from several webservices and
saves these data to table...

So I'm wondering how to go about implementing this so that this thread is
automatically started at a specific time. (lets say 03:30 am at day 1 on
each month).

maybe the winservice framework has some features for this?

any suggestions?
 
I'm working on a winservice created in .NET 2.0. Now I want to do some
modications to this winservice. I want this winservice at every start of a
new month to start a thread which pulls data from several webservices and
saves these data to table...

So I'm wondering how to go about implementing this so that this thread is
automatically started at a specific time. (lets say 03:30 am at day 1 on
each month).

maybe the winservice framework has some features for this?

Is there any reason to put this into the windows service rather than
just using a Windows scheduled task?

Jon
 
Thank you for the tip!

I think maybe the way to go is to create an app which in windows server 2003
can be configured as an scheduled task. And then make this app call the
winservice...

this app don't need any GUI., all it will do is retrieve information from
webservices and save it in a database

you agree it's best to create this app as a console app?
 
Thank you for the tip!

I think maybe the way to go is to create an app which in windows server 2003
can be configured as an scheduled task. And then make this app call the
winservice...

Why should it call the windows service? When not just do the work
within the scheduled task?
this app don't need any GUI., all it will do is retrieve information from
webservices and save it in a database

you agree it's best to create this app as a console app?

I'd create it as a Windows application which never shows any windows -
that way it won't try to create a new console window. On the other
hand, I realise that makes it slightly harder to debug :(

Jon
 
Jon Skeet said:
Why should it call the windows service? When not just do the work
within the scheduled task?


I'd create it as a Windows application which never shows any windows -
that way it won't try to create a new console window. On the other
hand, I realise that makes it slightly harder to debug :(

Jon



Scheduled tasks (should ) run in a non visible desktop as they should be
able to run when no user is logged on, so there is no need for a Windows
Application, a (robust) Console app. is a perfect fit.

Willy.
 
Jon Skeet said:
Is there any reason to put this into the windows service rather than
just using a Windows scheduled task?

The other option, if a service is needed, would be to leave a thread
sleeping with a waitable timer, not sure what the .NET wrapper for the
waitable timer API is.

But definitely better not to have a service started when not needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top