473,498 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Schedule adn events - the right way

I am going to write a windows service and i need some info.
How is the right way to make it do thing as specified time?
Should I use a timer, which checks the time and execute what it have to, or
there is some other way?

Also I want my service to respond to events, generated from other software
(my own apps). How this can be accomplished?
Nov 21 '05 #1
1 1079
Nikolay,
If the service has to be running (so it can respond to your events) I would
probably use System.Threading.Timer to have a method start executing at a
specific time from now. Other wise I would consider using a Scheduled Task
under Windows Control Panel.

For the service to respond to "events" in your other programs, largely
depends on how your other apps are going to "raise the event".

You could use Remoting where your apps call into an object offered by your
Service when an "event" occurs.

Your apps could use ServiceController.ExecuteCommand to send your service an
integer that represents the "event".

I believe you could also have your other apps use the
System.Management.Instrumentation namespace to raise "events" that your
service would monitor for...

You could use TCP/IP...

You could use System.Messaging namespace.

I'm sure there are other options available, it really depends on the kind of
"events" we are talking, and what you expect to do with them...

Hope this helps
Jay
"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uM**************@TK2MSFTNGP15.phx.gbl...
I am going to write a windows service and i need some info.
How is the right way to make it do thing as specified time?
Should I use a timer, which checks the time and execute what it have to,
or there is some other way?

Also I want my service to respond to events, generated from other software
(my own apps). How this can be accomplished?

Nov 21 '05 #2

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

Similar topics

2
3084
by: Yvan | last post by:
Hi, I will first expose what I need to do, and then how I did it so far: I have a simple java application that is monitoring the status of several services, the configuration for this monitoring...
1
1360
by: msnews.microsoft.com | last post by:
Hi, Can you schedule emails/events based on SQL data? Example: User sets an expiration date via web form to SQL DB. When this date arrives, send out an email to the user via web form. Any...
8
2459
by: adam | last post by:
I've seen this on a number of TV sites, where on the front page they tell you what's playing at the time you're browsing, what's coming up next, etc. I want to do this for a site I'm working on,...
0
1711
by: argniw | last post by:
I have a schedule of annual events that need to occur in different locations throughout the year. Each event has a due date associated with it. I also have an optimal schedule that consolidates...
1
2779
by: greg7224 | last post by:
I am currently working on a C# project that uses the Janus schedule controls, and am having trouble getting it to print correctly in Day view. The problem is that it will not print out the owners...
2
3475
by: zek2005 | last post by:
Hi Friends!!! I want to create an option to the user to suscribe to a service that sends an automatic mails everyday with information taken from a database created in MySQL. I have the form...
23
6458
by: pamelafluente | last post by:
Hi guys! I want to do a large number of scheduled task (say 80). Each task can be run at a certain time every given weekday. For instance at 10am and 5pm on each monday, etc. I would like to...
0
1051
by: Brian Quinlan | last post by:
What's New? =========== The talk schedule for the Vancouver Python Workshop is now available: http://www.vanpyz.org/conference/talkschedule.html This years line-up might be even stronger than...
3
1888
by: assgar | last post by:
Hi I am having problem with my loping. I don't know if I have chosen the correct approach. GOAL: I need to insert into a table event types for a specific date range. The calendar the event...
0
7125
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
7002
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
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
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,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.