By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

scheduling

P: n/a
Hello,
I have created a Class that creates Schedules
daily, ,interval (seconds), monthly, etc

this class only holds next run time, updates to nextrun time after and so
forth...just holds holds information about a single schedule and methods to
preform maintenance...

lets say i have a list of 100 of the above schedules to execute some event
based on daily, seconds, weekly, etc
there stored in a Collection
what would be the best way to impliment this in a windows service
1 . single timer in the service set to say 10ms to scan the collection and
see if current time is time to kick off event
or
2. set a timer for each indivual schedule and let the service just maintain
the list of schedules

hope i explained that enough
tks
DaveL


Jul 6 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Have you looked at the Windows Task Scheduler? I have seen so many people
making windows services which have all sorts of logic about running things
every X days/minutes etc. The put in clever configuration so they can chop
and change what gets run, even put in things to run as other users.
Then I show them around the task scheduler and they realise that Microsoft
already wrote all that code, tested it, and released it for free as part of
the OS.
I have seen fare less people who needed to write their own solution then
people who should have used Scheduler.

Check it out.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"daveL" wrote:
Hello,
I have created a Class that creates Schedules
daily, ,interval (seconds), monthly, etc

this class only holds next run time, updates to nextrun time after and so
forth...just holds holds information about a single schedule and methods to
preform maintenance...

lets say i have a list of 100 of the above schedules to execute some event
based on daily, seconds, weekly, etc
there stored in a Collection
what would be the best way to impliment this in a windows service
1 . single timer in the service set to say 10ms to scan the collection and
see if current time is time to kick off event
or
2. set a timer for each indivual schedule and let the service just maintain
the list of schedules

hope i explained that enough
tks
DaveL


Jul 7 '08 #2

P: n/a
thanks i'll talke a good look at windows schedular

Dave

"Ciaran O''Donnell" <Ci************@discussions.microsoft.comwrote in
message news:FC**********************************@microsof t.com...
Have you looked at the Windows Task Scheduler? I have seen so many people
making windows services which have all sorts of logic about running things
every X days/minutes etc. The put in clever configuration so they can chop
and change what gets run, even put in things to run as other users.
Then I show them around the task scheduler and they realise that Microsoft
already wrote all that code, tested it, and released it for free as part
of
the OS.
I have seen fare less people who needed to write their own solution then
people who should have used Scheduler.

Check it out.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"daveL" wrote:
>Hello,
I have created a Class that creates Schedules
daily, ,interval (seconds), monthly, etc

this class only holds next run time, updates to nextrun time after and so
forth...just holds holds information about a single schedule and methods
to
preform maintenance...

lets say i have a list of 100 of the above schedules to execute some
event
based on daily, seconds, weekly, etc
there stored in a Collection
what would be the best way to impliment this in a windows service
1 . single timer in the service set to say 10ms to scan the collection
and
see if current time is time to kick off event
or
2. set a timer for each indivual schedule and let the service just
maintain
the list of schedules

hope i explained that enough
tks
DaveL



Jul 9 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.