How to delay the start of a service?

Page 2 of 2 FirstFirst 12

  1. whs
    Posts : 26,210
    Vista, Windows7, Mint Mate, Zorin, Windows 8
       #11

    goofyfoot2001 said:
    I see virtually ZERO difference between automatic and delayed start. I find it HARD to believe NO ONE has found a way to DELAY the start of a service by some time period without going around their elbo to get to their a$$.
    If your system is on a SSD, you would probably not notice a difference if you delayed 2 or 3 services. But from a HDD it is noticeable.

    I use WinPatrol to delay the startups. It is the easiest.
      My Computer


  2. Posts : 2,497
    Windows 7 Pro 64 bit
       #12

    Apparently delayed start services start 2 minutes after the last automatic start service has started. This can be controlled by a registry setting but I don't know what it is. Note that this setting is global, it is for all delayed start services. To control the delay of an individual service you would need something like Winpatrol or other advanced method.
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
       #13

    To do it simply with stuff that's already on your machine you can use a .cmd batch file. Make a shortcut to the .cmd file and put it in the Startup folder. You can open the StartUp folder by using this command in the Run box:
    shell:startup

    I would set the shortcut to run mnimized. To use the batch below set the service to Manual:

    (Name the file whatever you want MyServiceDelayed.cmd or whatever)
    Code:
    @echo off
    rem the number after -n is the delay in minutes
    rem as shown below the delay would be one minute
    ping 192.0.2.2 -n 1 -w 60000 > nul
    rem use sc.exe to start the service
    sc start ServiceName
    of course use the real name of the service you set to Manual previously instead of ServiceName

    edit: of course the delay is in addition to how long it takes Windows to get around to running the batch file after login.
      My Computer


  4. Posts : 1
    various
       #14

    timeout command


    I've used something like this in batch script:

    c:
    timeout /t 300
    net start "your service name"
    exit

    The above command runs the net start command 300 seconds (5 minutes) after the script is invoked.

    Save the above commands in a .bat file and schedule to run when the computer starts with the task manager. The account used to schedule in the task manager will need "log on as a service" and "log on as a batch" rights in the local security policy settings.

    In my case it is used to start a service that fails to automatically start due to another dependency service not starting in time.

    You can also set the service to start manually, so it doesn't start right away, and then automatically start it with the scheduled script.
    Last edited by debinski; 21 Jul 2014 at 09:39. Reason: add'l info
      My Computer


  5. Posts : 5,092
    Windows 7 32 bit
       #15

    If using timeout as delay in a batch it's a good idea to also specify /NOBREAK to avoid return when any key is pressed. Timeout is simpler. But the ping technique has the advantage of working across many flavors of Windows. For Vista and later seems fine though.
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:42.
Find Us