Automate a Windows Service
Hi all,
In any Windows Service I can set the Startup type either Automatic, Manual or Disabled, on its properties window.
Ok, I change the Startup type to Automatic on one of my own service. Can I schedule a starting time of it. Say I want to start it 12:00:00 hours. Is there any option to do it.
I search on the Services properties, but no luck. Anyone know that how to do it?
Thanks,
Re: Automate a Windows Service
You can do that in your application. Or with the windows task scheduler. If you use the latter then you won't be able to install it as a service.
I suggest you use a timing mechanism in your program to carry out the operation.
Re: Automate a Windows Service
Yes I do. Simply use a Timer in application(C# .Net service) and I'm confusing with how to deal that initial step. So that's why I'm looking and general way to do it. :)
Re: Automate a Windows Service
Check the time as your timer ticks its events away before starting, or use a scheduled task to run net start "your service name".
Is this a daily thing or first-time-only?
Re: Automate a Windows Service
I have planed one thing to do now. Rather looking on a exact time, I try to deal with a time interval. So I don't want to worry about the starting time.
And also, for your question, yes this is only for the first-time.