473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

thread scheduling, how??

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?
Dec 14 '07 #1
5 2162
On Dec 14, 9:31 am, "Jeff" <do...@spam.mewrote:
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
Dec 14 '07 #2
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?
Dec 14 '07 #3
On Dec 14, 11:08 am, "Jeff" <do...@spam.mewrote:
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
Dec 14 '07 #4
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:c7**********************************@e25g2000 prg.googlegroups.com...
On Dec 14, 11:08 am, "Jeff" <do...@spam.mewrote:
>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


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.

Dec 14 '07 #5

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:df**********************************@b1g2000p ra.googlegroups.com...
On Dec 14, 9:31 am, "Jeff" <do...@spam.mewrote:
>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?
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.
>
Jon
Dec 14 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gilles Leblanc | last post by:
Hi I have started a small project with PyOpenGL. I am wondering what are the options for a GUI. So far I checked PyUI but it has some problems with 3d rendering outside the Windows platform. I...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
3
by: FrankEsser | last post by:
Hello! I am not an expert on C++ programming and therefor I have a question: We use a kind of communication server that was written in C++ especially for our company. It just takes incoming...
4
by: Sidd | last post by:
Hello, I was recently reading an article on threading in python and I came across Global Interpreter Lock,now as a novince in python I was cusrious about 1.Is writing a threaded code in python...
4
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the...
0
by: Steve W | last post by:
Hi, Our application needs to run a number of tasks in background - they are generally functionally unrelated and do different things but essentially they all run a particular process at...
22
by: nd02tsk | last post by:
Hello! I have a couple of final ( I hope, for your sake ) questions regarding PostgreSQL. I understand PostgreSQL uses processes rather than threads. I found this statement in the archives: ...
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
2
Ritchie
by: Ritchie | last post by:
Please can anyone help me with d programs in C for CPU scheduling: WAP to show FCFS scheduling algorithm. WAP to show SJF scheduling algorithm. WAP to show Priority scheduling algorithm. WAP...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.