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

how to monitor the system clock for changes

P: n/a
i'm working on a windows service that needs to check the system's clock
every minute and see if there are any jobs in my database taht are scheduled
to run at that time:

sSql = "select * from tblJobs where runTime = " + dtTheCurrentSystemTime

are there any classes designed to allow me to monitor changes to the system
clock?

tks
Jul 19 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Check the following link. You might have to do some indenting though, as
there seems to be a bit of a problem with the source code being displayed.

http://msdn2.microsoft.com/en-us/lib...DownFilterText
Adrian.
--
[Please mark my answer if it was helpful to you]


"Dica" wrote:
i'm working on a windows service that needs to check the system's clock
every minute and see if there are any jobs in my database taht are scheduled
to run at that time:

sSql = "select * from tblJobs where runTime = " + dtTheCurrentSystemTime

are there any classes designed to allow me to monitor changes to the system
clock?

tks
Jul 19 '07 #2

P: n/a
You will want to use a System.Timers.Timer object and handle the Elapsed
event. In the handler, do the checks that you wish. I don't use database
scheduled events, so I cannot address that.

"Dica" wrote:
i'm working on a windows service that needs to check the system's clock
every minute and see if there are any jobs in my database taht are scheduled
to run at that time:

sSql = "select * from tblJobs where runTime = " + dtTheCurrentSystemTime

are there any classes designed to allow me to monitor changes to the system
clock?

tks
Jul 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.