Yann Shukor
asked on
Delayed service start
Hi
I tried to delay the launch of two services (PRTG) because the data that this app uses is on a network drive that isn't available when the server boots up
Apparently the delayed start adds two minutes to the service start process; unfortunately this isn't enough
So I create a batch file (cmd) which is executed from the task scheduler when the system starts up
I added a five minute pause before the Net Start commands in the batch
This unfortunately isn't working as planned
any ideas ?
thanks
yann
I tried to delay the launch of two services (PRTG) because the data that this app uses is on a network drive that isn't available when the server boots up
Apparently the delayed start adds two minutes to the service start process; unfortunately this isn't enough
So I create a batch file (cmd) which is executed from the task scheduler when the system starts up
I added a five minute pause before the Net Start commands in the batch
timeout /t 300
&& net start PRTGCoreService
&& net start PRTGProbeService
exit
This unfortunately isn't working as planned
any ideas ?
thanks
yann
ASKER
Thanks for your suggestion Viral
Sleep isn't a recognized command, that is why I use Timeout
My services are already in manual startup mode
Your solution is fine if one want's to execute this batch upon opening a session
I want run the batch when the server starts, whether or not a user session is initiated, that is why I used the task scheduler
Sleep isn't a recognized command, that is why I use Timeout
My services are already in manual startup mode
Your solution is fine if one want's to execute this batch upon opening a session
I want run the batch when the server starts, whether or not a user session is initiated, that is why I used the task scheduler
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Shaun, tried that first but windows 2012 R2 doesn't seem to take notice of the modified delay
Have you tried setting the master value in HKLM\SYSTEM\CurrentControl Set\Contro l\AutoStar tDelay?
ASKER
Shaun = yes
ASKER
Tried the registry update again and this time it worked
thanks
thanks
Create a new batch file and put it somewhere.
in the batch file, do this:
@echo off
cls
sleep 300
NET START SERVICENAME*
*the name of the service you want to start
Add a shortcut to the batch file to your startup (in the start menu). Adjust the time to sleep to be whatever you want.
so adding this batch file to server startup will resolve the issue.
Note : There is no need to schedule the task to start the service.