Click here to Skip to main content
15,917,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there a way to run nunit Test class 50 times in a loop ? Pin
jschell10-Oct-11 8:13
jschell10-Oct-11 8:13 
Questionlog in Code in c#.net Pin
jed20119-Oct-11 23:55
jed20119-Oct-11 23:55 
AnswerRe: log in Code in c#.net PinPopular
Pete O'Hanlon10-Oct-11 0:08
mvePete O'Hanlon10-Oct-11 0:08 
AnswerRe: log in Code in c#.net Pin
Subin Mavunkal10-Oct-11 3:10
Subin Mavunkal10-Oct-11 3:10 
GeneralRe: log in Code in c#.net Pin
Pete O'Hanlon10-Oct-11 3:33
mvePete O'Hanlon10-Oct-11 3:33 
AnswerRe: log in Code in c#.net Pin
annathor10-Oct-11 3:59
annathor10-Oct-11 3:59 
Questionhow to share Entriprise Library configuration information accross muliple projects in single solution? Pin
vashokraja9-Oct-11 23:39
vashokraja9-Oct-11 23:39 
AnswerRe: how to share Entriprise Library configuration information accross muliple projects in single solution? Pin
PIEBALDconsult10-Oct-11 2:39
mvePIEBALDconsult10-Oct-11 2:39 
QuestionWorking with .DAT file. Pin
sarang_k9-Oct-11 23:34
sarang_k9-Oct-11 23:34 
AnswerRe: Working with .DAT file. PinPopular
phil.o10-Oct-11 0:23
professionalphil.o10-Oct-11 0:23 
QuestionDynamic custom controls Pin
pravin_mun9-Oct-11 20:27
pravin_mun9-Oct-11 20:27 
AnswerRe: Dynamic custom controls Pin
Richard MacCutchan9-Oct-11 21:07
mveRichard MacCutchan9-Oct-11 21:07 
Questionnot all registry values being returned Pin
JimmyRopes9-Oct-11 20:03
professionalJimmyRopes9-Oct-11 20:03 
AnswerRe: not allregistry values being returned Pin
André Kraak9-Oct-11 20:49
André Kraak9-Oct-11 20:49 
GeneralRe: not allregistry values being returned Pin
JimmyRopes10-Oct-11 3:18
professionalJimmyRopes10-Oct-11 3:18 
GeneralRe: not allregistry values being returned Pin
André Kraak10-Oct-11 7:29
André Kraak10-Oct-11 7:29 
GeneralRe: not allregistry values being returned Pin
JimmyRopes10-Oct-11 15:14
professionalJimmyRopes10-Oct-11 15:14 
GeneralRe: not allregistry values being returned Pin
André Kraak10-Oct-11 22:40
André Kraak10-Oct-11 22:40 
GeneralRe: not allregistry values being returned Pin
JimmyRopes11-Oct-11 0:43
professionalJimmyRopes11-Oct-11 0:43 
Questionwaspmote c# programming (reading temperature and accelerometer) Pin
tusyukomi9-Oct-11 17:06
tusyukomi9-Oct-11 17:06 
AnswerRe: waspmote c# programming (reading temperature and accelerometer) Pin
Dave Kreskowiak9-Oct-11 17:20
mveDave Kreskowiak9-Oct-11 17:20 
AnswerRe: waspmote c# programming (reading temperature and accelerometer) Pin
BobJanova10-Oct-11 3:44
BobJanova10-Oct-11 3:44 
Questiondatetime scheduled events help please Pin
CCodeNewbie9-Oct-11 10:40
CCodeNewbie9-Oct-11 10:40 
Greetings Gurus,

I need an event to fire at set times during the day from a Windows service.

Code so far
C#
protected override void OnStart(string[] args)
        {
            if (DateTime.Now.TimeOfDay == System.TimeSpan.Parse("09:00:00"))
            do something

but I would like it to run at 13:00, 17:00 & 21:00 too.

What is the correct syntax please as I can't find any examples of how to do this. I don't want it to run every 4 hours (e.g. 01:00, 05:00) so I would prefer not to use a static schedule.

I would also like to add an event log entry if the service didn't run at the scheduled time so that it could be investigated but am not sure about how to go about it.

Could you help please?
AnswerRe: datetime scheduled events help please Pin
Pete O'Hanlon9-Oct-11 10:53
mvePete O'Hanlon9-Oct-11 10:53 
AnswerRe: datetime scheduled events help please Pin
Luc Pattyn9-Oct-11 12:11
sitebuilderLuc Pattyn9-Oct-11 12:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.