Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I ve created a windows service with time interval as 15 mins

but its not performing the job on its first run. I have to wait till 15 minutes each time i start the service .

any ideas?
Posted

Just call the Event handler the first time when you start the service.
 
Share this answer
 
You must have used some logic in timer_tick event. i suggest you move all that to a private fucntion. then when application start call this function before starting timer and also in timer_tick. so our work is done first time and then the timer will take care of it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900