Click here to Skip to main content
15,902,636 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: datetime scheduled events help please Pin
PIEBALDconsult9-Oct-11 14:03
mvePIEBALDconsult9-Oct-11 14:03 
QuestionSelecting multiple controls by mouse Pin
teknolog1239-Oct-11 4:16
teknolog1239-Oct-11 4:16 
SuggestionRe: Selecting multiple controls by mouse Pin
André Kraak9-Oct-11 4:19
André Kraak9-Oct-11 4:19 
GeneralRe: Selecting multiple controls by mouse Pin
teknolog1239-Oct-11 4:26
teknolog1239-Oct-11 4:26 
GeneralRe: Selecting multiple controls by mouse Pin
André Kraak9-Oct-11 4:45
André Kraak9-Oct-11 4:45 
GeneralRe: Selecting multiple controls by mouse Pin
teknolog1239-Oct-11 4:51
teknolog1239-Oct-11 4:51 
AnswerRe: Selecting multiple controls by mouse Pin
BillWoodruff9-Oct-11 12:03
professionalBillWoodruff9-Oct-11 12:03 
GeneralRe: Selecting multiple controls by mouse Pin
teknolog12311-Oct-11 0:16
teknolog12311-Oct-11 0:16 
GeneralRe: Selecting multiple controls by mouse Pin
BillWoodruff11-Oct-11 16:35
professionalBillWoodruff11-Oct-11 16:35 
GeneralRe: Selecting multiple controls by mouse Pin
teknolog12311-Oct-11 22:17
teknolog12311-Oct-11 22:17 
QuestionMEF Framework Pin
pravin_mun8-Oct-11 15:10
pravin_mun8-Oct-11 15:10 
AnswerRe: MEF Framework Pin
Abhinav S8-Oct-11 23:36
Abhinav S8-Oct-11 23:36 
AnswerRe: MEF Framework Pin
Luc Pattyn8-Oct-11 23:56
sitebuilderLuc Pattyn8-Oct-11 23:56 
AnswerRe: MEF Framework Pin
PIEBALDconsult9-Oct-11 3:55
mvePIEBALDconsult9-Oct-11 3:55 
QuestionUserdefinedControls Pin
pravin_mun8-Oct-11 15:07
pravin_mun8-Oct-11 15:07 

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.