|
-
Feb 22nd, 2008, 12:04 AM
#1
Thread Starter
PowerPoster
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,
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Feb 22nd, 2008, 11:15 AM
#2
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.
-
Feb 24th, 2008, 09:34 PM
#3
Thread Starter
PowerPoster
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.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Mar 2nd, 2008, 12:29 PM
#4
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?
-
Mar 9th, 2008, 08:48 PM
#5
Thread Starter
PowerPoster
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.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|